SWE WebRefiner integration

Change-Id: I85bcb0e75b3942affa2cb1fe0d07b005a8560ad6
diff --git a/res/drawable/rounded_rectangle_background.xml b/res/drawable/rounded_rectangle_background.xml
new file mode 100644
index 0000000..b521143
--- /dev/null
+++ b/res/drawable/rounded_rectangle_background.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+    *
+    * Redistribution and use in source and binary forms, with or without
+    * modification, are permitted provided that the following conditions are
+    * met:
+    * * Redistributions of source code must retain the above copyright
+    * notice, this list of conditions and the following disclaimer.
+    * * Redistributions in binary form must reproduce the above
+    * copyright notice, this list of conditions and the following
+    * disclaimer in the documentation and/or other materials provided
+    * with the distribution.
+    * * Neither the name of The Linux Foundation nor the names of its
+    * contributors may be used to endorse or promote products derived
+    * from this software without specific prior written permission.
+    *
+    * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+    * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+    * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+    * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+    * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+    * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    *
+ -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+
+    <solid android:color="#ffa10404"></solid>
+    <corners android:radius="2dp"></corners>
+    <stroke  android:width="1dp" android:color="@color/black"></stroke>
+
+</shape>
diff --git a/res/layout/page_info.xml b/res/layout/page_info.xml
index e3b117c..3d4bf99 100644
--- a/res/layout/page_info.xml
+++ b/res/layout/page_info.xml
@@ -43,16 +43,6 @@
             android:orientation="vertical">
 
             <TextView
-                android:id="@+id/address_header"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/page_info_address"
-                android:gravity="start"
-                android:layout_marginStart="20dip"
-                android:layout_marginEnd="20dip"
-                android:layout_marginBottom="10dip" />
-
-            <TextView
                 android:id="@+id/address"
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
@@ -63,6 +53,46 @@
 
         </TableLayout>
 
+        <TableLayout
+            android:id="@+id/web_refiner_info"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/web_refiner_title"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:textStyle="bold"
+            android:layout_marginStart="20dip"
+            android:layout_marginEnd="20dip"
+            android:layout_marginTop="12dip"
+            android:text="WebRefiner"
+            android:layout_marginBottom="12dip" />
+
+            <TextView
+                android:id="@+id/web_refiner_status"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:gravity="start"
+                android:text="Enabled on this site"
+                android:layout_marginStart="20dip"
+                android:layout_marginEnd="20dip"
+                android:layout_marginBottom="12dip" />
+
+            <TextView
+                android:id="@+id/web_refiner_blocked_status"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:gravity="start"
+                android:text="99 URLs blocked on this page"
+                android:layout_marginStart="20dip"
+                android:layout_marginEnd="20dip"
+                android:layout_marginBottom="12dip" />
+
+        </TableLayout>
+
+
     </LinearLayout>
 
 </ScrollView>
diff --git a/res/layout/title_bar_nav.xml b/res/layout/title_bar_nav.xml
index 142b73b..83ef6bd 100644
--- a/res/layout/title_bar_nav.xml
+++ b/res/layout/title_bar_nav.xml
@@ -73,6 +73,21 @@
                 android:layout_height="32dip"
                 android:layout_gravity="center"
                 android:visibility="gone" />
+
+            <TextView
+                android:id="@+id/notification_counter"
+                android:layout_marginTop="6dip"
+                android:layout_width="15dp"
+                android:layout_height="15dp"
+                android:layout_gravity="top|end"
+                android:background="@drawable/rounded_rectangle_background"
+                android:textColor="#FFFFFF"
+                android:textSize="10sp"
+                android:gravity="center"
+                android:text="99"
+                android:textStyle="bold"
+                android:visibility="gone" />
+
         </FrameLayout>
 
         <ImageView
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 17a061e..fdfcc9d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -389,6 +389,10 @@
     <string name="pref_autofill_enabled">Form auto-fill</string>
     <!-- Settings summary for the form AutoFill feature. [CHAR-LIMIT=none] -->
     <string name="pref_autofill_enabled_summary">Fill out web forms with a single touch</string>
+    <!-- Checkbox setting for enabling/disabling WebRefiner feature -->
+    <string name="pref_web_refiner_enabled">Web Refiner</string>
+    <!-- Settings summary for the WebRefiner -->
+    <string name="pref_web_refiner_enabled_summary">Block advertisements and tracking</string>
     <!-- Label for option that when clicked opens the AutoFill settings screen. Also used as the title of that AutoFill Settings screen. [CHAR-LIMIT=32] -->
     <string name="pref_autofill_profile_editor">Auto-fill text</string>
     <!-- Summary for the AutoFill Settings preference [CHAR-LIMIT=none] -->
diff --git a/res/xml/general_preferences.xml b/res/xml/general_preferences.xml
index 8f5817f..662ef30 100644
--- a/res/xml/general_preferences.xml
+++ b/res/xml/general_preferences.xml
@@ -48,6 +48,12 @@
             android:summary="@string/pref_autofill_enabled_summary"
             android:defaultValue="true" />
 
+        <CheckBoxPreference
+            android:key="web_refiner_enabled"
+            android:title="@string/pref_web_refiner_enabled"
+            android:summary="@string/pref_web_refiner_enabled_summary"
+            android:defaultValue="true" />
+
         <PreferenceScreen
             android:key="autofill_profile"
             android:title="@string/pref_autofill_profile_editor"