~webapps/unity-chromium-extension/quantal

« back to all changes in this revision

Viewing changes to chromium-patches/stable-20.0.1132.47/desktop-integration-settings.patch

New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: chrome/chrome_browser.gypi
 
2
===================================================================
 
3
--- chrome/chrome_browser.gypi  (revision 136242)
 
4
+++ chrome/chrome_browser.gypi  (working copy)
 
5
@@ -3795,6 +3795,8 @@
 
6
         'browser/ui/webui/options2/cookies_view_handler2.h',
 
7
         'browser/ui/webui/options2/core_options_handler2.cc',
 
8
         'browser/ui/webui/options2/core_options_handler2.h',
 
9
+        'browser/ui/webui/options2/desktop_integration_settings_handler2.cc',
 
10
+        'browser/ui/webui/options2/desktop_integration_settings_handler2.h',
 
11
         'browser/ui/webui/options2/font_settings_handler2.cc',
 
12
         'browser/ui/webui/options2/font_settings_handler2.h',
 
13
         'browser/ui/webui/options2/font_settings_utils2.h',
 
14
Index: chrome/app/generated_resources.grd
 
15
===================================================================
 
16
--- chrome/app/generated_resources.grd  (revision 136242)
 
17
+++ chrome/app/generated_resources.grd  (working copy)
 
18
@@ -10393,6 +10393,9 @@
 
19
       <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT">
 
20
         Web content
 
21
       </message>
 
22
+      <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_INTEGRATION">
 
23
+        Desktop Integration
 
24
+      </message>
 
25
       <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY">
 
26
         HTTPS/SSL
 
27
       </message>
 
28
@@ -16037,6 +16040,35 @@
 
29
       </message>
 
30
     </if>
 
31
 
 
32
+    <!-- Desktop integration -->
 
33
+    <message name="IDS_PROMPT_INTEGRATION_ENABLE_BUTTON_LABEL" desc="The text to be displayed on the checkbox that enables desktop integration.">
 
34
+      Prompt integration options for any website
 
35
+    </message>
 
36
+    <message name="IDS_DESKTOP_INTEGRATION_SETTINGS_EXCEPTIONS_BUTTON_LABEL" desc="The text to be displayed on the button that drives integration exceptions.">
 
37
+      Exceptions...
 
38
+    </message>
 
39
+    <message name="IDS_DESKTOP_INTEGRATION_SETTINGS_OVERLAY_TITLE" desc="Title for the desktop integration overlay.">
 
40
+      Integration prompt exceptions
 
41
+    </message>
 
42
+    <message name="IDS_DESKTOP_INTEGRATION_SETTINGS_OVERLAY_DESCRIPTION" desc="Description for the desktop integration overlay.">
 
43
+      These websites won't prompt any integration options
 
44
+    </message>
 
45
+    <message name="IDS_DESKTOP_INTEGRATION_SETTINGS_OVERLAY_COLUMN_DESCRIPTION" desc="Description of the desktop integration overlay's integrated websites list column.">
 
46
+      Website domains
 
47
+    </message>
 
48
+    <message name="IDS_OPTIONS_SETTINGS_INTEGRATION_WEBSITE_ADD_BUTTON"
 
49
+             desc="The label for the add button for adding a integration websites">
 
50
+      Add
 
51
+    </message>
 
52
+    <message name="IDS_OPTIONS_SETTINGS_INTEGRATION_WEBSITE_ADD_TEXT"
 
53
+             desc="The description text for the add overlay for adding a integration websites">
 
54
+      Website domain name (e.g. www.html5rocks.com)
 
55
+    </message>
 
56
+    <message name="IDS_OPTIONS_SETTINGS_INTEGRATION_WEBSITE_ADD_TITLE"
 
57
+             desc="Title for add overlay for adding a integration websites">
 
58
+      Add Integrated Website
 
59
+    </message>
 
60
+
 
61
     <!-- Manage Profile Dialog -->
 
62
     <message name="IDS_PROFILES_MANAGE_TITLE" desc="Title of the manage profile dialog">
 
63
       Edit user
 
64
Index: chrome/browser/resources/options2/options.html
 
65
===================================================================
 
66
--- chrome/browser/resources/options2/options.html      (revision 136242)
 
67
+++ chrome/browser/resources/options2/options.html      (working copy)
 
68
@@ -19,6 +19,7 @@
 
69
 <link rel="stylesheet" href="clear_browser_data_overlay.css">
 
70
 <link rel="stylesheet" href="content_settings.css">
 
71
 <link rel="stylesheet" href="cookies_view.css">
 
72
+<link rel="stylesheet" href="desktop_integration_overlay.css">
 
73
 <link rel="stylesheet" href="font_settings.css">
 
74
 <link rel="stylesheet" href="handler_options.css">
 
75
 <link rel="stylesheet" href="home_page_overlay.css">
 
76
@@ -85,6 +86,7 @@
 
77
   <include src="font_settings.html">
 
78
   <include src="home_page_overlay.html">
 
79
   <include src="import_data_overlay.html">
 
80
+  <include src="desktop_integration_overlay.html">
 
81
   <include src="instant_confirm_overlay.html">
 
82
   <include src="language_options.html">
 
83
   <include src="manage_profile_overlay.html">
 
84
@@ -115,6 +117,7 @@
 
85
   <include src="autofill_edit_creditcard_overlay.html">
 
86
   <include src="content_settings_exceptions_area.html">
 
87
   <include src="cookies_view.html">
 
88
+  <include src="desktop_integration_add_website_overlay.html">
 
89
   <include src="handler_options.html">
 
90
   <include src="language_add_language_overlay.html">
 
91
   <if expr="pp_ifdef('chromeos')">
 
92
Index: chrome/browser/resources/options2/options.js
 
93
===================================================================
 
94
--- chrome/browser/resources/options2/options.js        (revision 136242)
 
95
+++ chrome/browser/resources/options2/options.js        (working copy)
 
96
@@ -13,6 +13,8 @@
 
97
 var ContentSettingsExceptionsArea =
 
98
     options.contentSettings.ContentSettingsExceptionsArea;
 
99
 var CookiesView = options.CookiesView;
 
100
+var DesktopIntegrationOverlay = options.DesktopIntegrationOverlay;
 
101
+var AddDesktopIntegrationWebsiteOverlay = options.AddDesktopIntegrationWebsiteOverlay;
 
102
 var FontSettings = options.FontSettings;
 
103
 var HandlerOptions = options.HandlerOptions;
 
104
 var HomePageOverlay = options.HomePageOverlay;
 
105
@@ -84,6 +86,13 @@
 
106
   OptionsPage.registerOverlay(FontSettings.getInstance(),
 
107
                               BrowserOptions.getInstance(),
 
108
                               [$('fontSettingsCustomizeFontsButton')]);
 
109
+  if (cr.isLinux && !cr.isChromeos) {
 
110
+    OptionsPage.registerOverlay(AddDesktopIntegrationWebsiteOverlay.getInstance(),
 
111
+                                DesktopIntegrationOverlay.getInstance());
 
112
+    OptionsPage.registerOverlay(DesktopIntegrationOverlay.getInstance(),
 
113
+                                BrowserOptions.getInstance(),
 
114
+                                [$('desktop-integration-button')]);
 
115
+  }
 
116
   if (HandlerOptions && $('manage-handlers-button')) {
 
117
     OptionsPage.registerOverlay(HandlerOptions.getInstance(),
 
118
                                 ContentSettings.getInstance(),
 
119
Index: chrome/browser/resources/options2/desktop_integration_add_website_overlay.html
 
120
===================================================================
 
121
--- chrome/browser/resources/options2/desktop_integration_add_website_overlay.html      (revision 0)
 
122
+++ chrome/browser/resources/options2/desktop_integration_add_website_overlay.html      (revision 0)
 
123
@@ -0,0 +1,16 @@
 
124
+<div id="add-desktop-integration-website-overlay-page" class="page" hidden>
 
125
+  <div class="close-button"></div>
 
126
+  <h1 i18n-content="add_desktop_website_title"></h1>
 
127
+
 
128
+  <div class="content-area">
 
129
+    <span i18n-content="add_desktop_website_input_label"></span>
 
130
+    <input id="website-url-field" type="url" data-type="url"
 
131
+           class="weakrtl favicon-cell hbox stretch">
 
132
+  </div>
 
133
+
 
134
+  <div class="action-area button-strip">
 
135
+    <button id="add-integration-website-overlay-cancel-button" i18n-content="cancel">
 
136
+    </button>
 
137
+    <button id="add-integration-website-overlay-ok-button" i18n-content="ok"></button>
 
138
+  </div>
 
139
+</div>
 
140
Index: chrome/browser/resources/options2/desktop_integration_add_website_overlay.js
 
141
===================================================================
 
142
--- chrome/browser/resources/options2/desktop_integration_add_website_overlay.js        (revision 0)
 
143
+++ chrome/browser/resources/options2/desktop_integration_add_website_overlay.js        (revision 0)
 
144
@@ -0,0 +1,44 @@
 
145
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 
146
+// Use of this source code is governed by a BSD-style license that can be
 
147
+// found in the LICENSE file.
 
148
+
 
149
+///////////////////////////////////////////////////////////////////////////////
 
150
+// AddDesktopIntegrationWebsiteOverlay class:
 
151
+
 
152
+cr.define('options', function() {
 
153
+  /** @const */ var OptionsPage = options.OptionsPage;
 
154
+
 
155
+  /**
 
156
+   * @constructor
 
157
+   */
 
158
+  function AddDesktopIntegrationWebsiteOverlay() {
 
159
+    OptionsPage.call(this, 'addDesktopIntegrationWebsite',
 
160
+                     localStrings.getString('add_button'),
 
161
+                     'add-desktop-integration-website-overlay-page');
 
162
+  }
 
163
+
 
164
+  cr.addSingletonGetter(AddDesktopIntegrationWebsiteOverlay);
 
165
+
 
166
+  AddDesktopIntegrationWebsiteOverlay.prototype = {
 
167
+    // Inherit AddDesktopIntegrationWebsiteOverlay from OptionsPage.
 
168
+    __proto__: OptionsPage.prototype,
 
169
+
 
170
+    /**
 
171
+     * Initializes AddDesktopIntegrationWebsiteOverlay page.
 
172
+     * Calls base class implementation to starts preference initialization.
 
173
+     */
 
174
+    initializePage: function() {
 
175
+      // Call base class implementation to starts preference initialization.
 
176
+      OptionsPage.prototype.initializePage.call(this);
 
177
+
 
178
+      // Set up the cancel button.
 
179
+      $('add-integration-website-overlay-cancel-button').onclick = function(e) {
 
180
+        OptionsPage.closeOverlay();
 
181
+      };
 
182
+    },
 
183
+  };
 
184
+
 
185
+  return {
 
186
+    AddDesktopIntegrationWebsiteOverlay: AddDesktopIntegrationWebsiteOverlay
 
187
+  };
 
188
+});
 
189
Index: chrome/browser/resources/options2/options_bundle.js
 
190
===================================================================
 
191
--- chrome/browser/resources/options2/options_bundle.js (revision 136242)
 
192
+++ chrome/browser/resources/options2/options_bundle.js (working copy)
 
193
@@ -72,6 +72,8 @@
 
194
 <include src="content_settings_ui.js"></include>
 
195
 <include src="cookies_list.js"></include>
 
196
 <include src="cookies_view.js"></include>
 
197
+<include src="desktop_integration_add_website_overlay.js"></include>
 
198
+<include src="desktop_integration_overlay.js"></include>
 
199
 <include src="font_settings.js"></include>
 
200
 <include src="handler_options.js"></include>
 
201
 <include src="handler_options_list.js"></include>
 
202
Index: chrome/browser/resources/options2/browser_options.html
 
203
===================================================================
 
204
--- chrome/browser/resources/options2/browser_options.html      (revision 136242)
 
205
+++ chrome/browser/resources/options2/browser_options.html      (working copy)
 
206
@@ -37,7 +37,7 @@
 
207
 <if expr="not pp_ifdef('toolkit_views') and is_posix and not is_macosx">
 
208
       <button id="themes-gallery" i18n-content="themesGallery"></button>
 
209
       <button id="themes-GTK-button"
 
210
-          i18n-content="themesGTKButton"></button>
 
211
+              i18n-content="themesGTKButton"></button>
 
212
       <button id="themes-reset"
 
213
           i18n-content="themesSetClassic"></button>
 
214
 </if>
 
215
@@ -356,6 +356,22 @@
 
216
 </if>
 
217
     </div>
 
218
   </section>
 
219
+
 
220
+<if expr="is_linux and not pp_ifdef('chromeos')">
 
221
+  <section id="desktop-integration-section">
 
222
+    <h3 i18n-content="advancedSectionTitleIntegration"></h3>
 
223
+    <div class="checkbox">
 
224
+      <label>
 
225
+        <input id="promptIntegrationForAnyWebsite" pref="desktop_integration_prompt.enabled"
 
226
+            metric="Options_PromptIntegration" type="checkbox">
 
227
+        <span i18n-content="promptIntegrationEnableIntegration"></span>
 
228
+      </label>
 
229
+    </div>
 
230
+    <button id="desktop-integration-button"
 
231
+        i18n-content="desktopIntegrationExceptionsSettingsButton"></button>
 
232
+  </section>
 
233
+</if>
 
234
+
 
235
 <if expr="not pp_ifdef('chromeos')">
 
236
   <section>
 
237
     <h3 i18n-content="advancedSectionTitleNetwork"></h3>
 
238
Index: chrome/browser/resources/options2/desktop_integration_overlay.html
 
239
===================================================================
 
240
--- chrome/browser/resources/options2/desktop_integration_overlay.html  (revision 0)
 
241
+++ chrome/browser/resources/options2/desktop_integration_overlay.html  (revision 0)
 
242
@@ -0,0 +1,31 @@
 
243
+<div id="desktop-integration-area" class="page" hidden>
 
244
+
 
245
+  <div class="close-button"></div>
 
246
+  <h1 i18n-content="desktopIntegrationPage"></h1>
 
247
+  
 
248
+  <span i18n-content="desktopIntegrationInfoText"></span>
 
249
 
250
+  <div id="desktop-integration-column-headers">
 
251
+    <div id="desktop-integration-description-column" i18n-content="desktopIntegrationColumnDescription">
 
252
+    </div>
 
253
+  </div>
 
254
+
 
255
+  <div class="content-area">
 
256
+    <list id="domains-list"></list>
 
257
+
 
258
+    <div class="desktop-integration-lower-left">
 
259
+      <button id="desktop-integration-add-button"
 
260
+              i18n-content="add_button"></button>
 
261
+    </div>
 
262
+  </div>
 
263
+
 
264
+  <div class="action-area">
 
265
+    <div class="button-strip">
 
266
+      <button id="desktop-integrations-overlay-confirm"
 
267
+          i18n-content="ok">
 
268
+      </button>
 
269
+    </div>
 
270
+  </div>
 
271
+
 
272
+</div>
 
273
+
 
274
Index: chrome/browser/resources/options2/desktop_integration_overlay.js
 
275
===================================================================
 
276
--- chrome/browser/resources/options2/desktop_integration_overlay.js    (revision 0)
 
277
+++ chrome/browser/resources/options2/desktop_integration_overlay.js    (revision 0)
 
278
@@ -0,0 +1,201 @@
 
279
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 
280
+// Use of this source code is governed by a BSD-style license that can be
 
281
+// found in the LICENSE file.
 
282
+
 
283
+cr.define('options', function() {
 
284
+  /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
 
285
+  /** @const */ var DeletableItemList = options.DeletableItemList;
 
286
+  /** @const */ var DeletableItem = options.DeletableItem;
 
287
+
 
288
+  /**
 
289
+   * Creates a new exceptions list item.
 
290
+   * @constructor
 
291
+   * @extends {options.DeletableItem}
 
292
+   */
 
293
+  function IntegratedWebsitesListItem(domain) {
 
294
+    var el = cr.doc.createElement('div');
 
295
+    el.__proto__ = IntegratedWebsitesListItem.prototype;
 
296
+    el.domain = domain;
 
297
+    el.decorate();
 
298
+    return el;
 
299
+  }
 
300
+
 
301
+  IntegratedWebsitesListItem.prototype = {
 
302
+    __proto__: DeletableItem.prototype,
 
303
+
 
304
+    /**
 
305
+     * Called when an element is decorated as a list item.
 
306
+     */
 
307
+    decorate: function() {
 
308
+      DeletableItem.prototype.decorate.call(this);
 
309
+
 
310
+      // The stored label.
 
311
+      var label = this.ownerDocument.createElement('div');
 
312
+      label.className = 'domain-name';
 
313
+      label.textContent = this.domain;
 
314
+      this.contentElement.appendChild(label);
 
315
+
 
316
+      this.deletable = true;
 
317
+    },
 
318
+  };
 
319
+
 
320
+  /**
 
321
+   * Creates a integrated websites list.
 
322
+   * @constructor
 
323
+   * @extends {cr.ui.List}
 
324
+   */
 
325
+  var IntegratedWebsitesList = cr.ui.define('list');
 
326
+
 
327
+  IntegratedWebsitesList.prototype = {
 
328
+    __proto__: DeletableItemList.prototype,
 
329
+
 
330
+    /**
 
331
+     * Called when an element is decorated as a list.
 
332
+     */
 
333
+    decorate: function() {
 
334
+      DeletableItemList.prototype.decorate.call(this);
 
335
+      this.reset();
 
336
+    },
 
337
+
 
338
+    /** @inheritDoc */
 
339
+    createItem: function(domain) {
 
340
+      return new IntegratedWebsitesListItem(domain);
 
341
+    },
 
342
+
 
343
+    /*
 
344
+     * Adds a website domain name to the list of allowed integrated websites.
 
345
+     * @param {string} domain domain name of the website to add.
 
346
+     */
 
347
+    addWebsite: function(domain) {
 
348
+      if (!domain || this.dataModel.indexOf(domain) >= 0) {
 
349
+        return;
 
350
+      }
 
351
+      this.dataModel.push(url);
 
352
+      this.redraw();
 
353
+      chrome.send('addIntegrationSite', [domain]);
 
354
+    },
 
355
+
 
356
+    /**
 
357
+     * Forces a revailidation of the list content. Content added while the list
 
358
+     * is hidden is not properly rendered when the list becomes visible. In
 
359
+     * addition, deleting a single item from the list results in a stale cache
 
360
+     * requiring an invalidation.
 
361
+     */
 
362
+    refresh: function() {
 
363
+      // TODO(kevers): Investigate if the root source of the problems can be
 
364
+      // fixed in cr.ui.list.
 
365
+      this.invalidate();
 
366
+      this.redraw();
 
367
+    },
 
368
+
 
369
+    /**
 
370
+     * Sets the integrated websites in the js model.
 
371
+     * @param {Object} entries A list of dictionaries of values, each dictionary
 
372
+     *     represents an exception.
 
373
+     */
 
374
+    setIntegratedWebsites: function(entries) {
 
375
+      var integratedWebsites = null;
 
376
+      try {
 
377
+        integratedWebsites = JSON.parse(entries);
 
378
+      } catch(e) {
 
379
+        console.log("Error while parsing integrated websites json: " + entries);
 
380
+        return;
 
381
+      }
 
382
+      // TODO hightlight domains differently based on permission
 
383
+      var domains = [];
 
384
+      domains = domains.concat(integratedWebsites['allowed']);
 
385
+      domains = domains.concat(integratedWebsites['dontask']);
 
386
+      this.dataModel = new ArrayDataModel(domains);
 
387
+      this.refresh();
 
388
+    },
 
389
+
 
390
+    /**
 
391
+     * Removes all integration scripts from the js model.
 
392
+     */
 
393
+    reset: function() {
 
394
+      this.dataModel = new ArrayDataModel([]);
 
395
+    },
 
396
+
 
397
+    /** @inheritDoc */
 
398
+    deleteItemAtIndex: function(index) {
 
399
+      if (index >= 0) {
 
400
+        var args = [this.dataModel.item(index)];
 
401
+        chrome.send('removeIntegrationSite', args);
 
402
+        this.dataModel.splice(index, 1);
 
403
+      }
 
404
+    },
 
405
+
 
406
+    /**
 
407
+     * The length of the list.
 
408
+     */
 
409
+    get length() {
 
410
+      return null != this.dataModel ? this.dataModel.length : 0;
 
411
+    },
 
412
+  };
 
413
+
 
414
+  var OptionsPage = options.OptionsPage;
 
415
+
 
416
+  /**
 
417
+   * DesktopIntegrationOverlay class
 
418
+   * Encapsulated handling of the 'Desktop integration' page.
 
419
+   * @class
 
420
+   */
 
421
+  function DesktopIntegrationOverlay() {
 
422
+    OptionsPage.call(this, 'desktopIntegrationOverlay',
 
423
+                     templateData.desktopIntegrationPage,
 
424
+                     'desktop-integration-area');
 
425
+  }
 
426
+
 
427
+  cr.addSingletonGetter(DesktopIntegrationOverlay);
 
428
+
 
429
+  DesktopIntegrationOverlay.prototype = {
 
430
+    __proto__: OptionsPage.prototype,
 
431
+
 
432
+    /**
 
433
+     * Initialize the page.
 
434
+     */
 
435
+    initializePage: function() {
 
436
+      OptionsPage.prototype.initializePage.call(this);
 
437
+
 
438
+      var integrationList = $('domains-list');
 
439
+      IntegratedWebsitesList.decorate(integrationList);
 
440
+      $('desktop-integrations-overlay-confirm').onclick =
 
441
+          OptionsPage.closeOverlay.bind(OptionsPage);
 
442
+
 
443
+      // Set up add button.
 
444
+      $('desktop-integration-add-button').onclick = function(e) {
 
445
+        OptionsPage.navigateToPage('addDesktopIntegrationWebsite');
 
446
+      };
 
447
+
 
448
+      // Listen to add website dialog ok button.
 
449
+      var addWebsiteOkButton = $('add-integration-website-overlay-ok-button');
 
450
+      addWebsiteOkButton.addEventListener('click',
 
451
+          this.handleAddWebsiteOkButtonClick_.bind(this));
 
452
+    },
 
453
+
 
454
+    handleAddWebsiteOkButtonClick_: function () {
 
455
+      var website = $('website-url-field').value;
 
456
+      $('domains-list').addWebsite(String(website));
 
457
+      OptionsPage.closeOverlay();
 
458
+    },
 
459
+
 
460
+    /**
 
461
+     * Called by the options page when this page has been shown.
 
462
+     */
 
463
+    didShowPage: function() {
 
464
+      chrome.send('updateIntegratedWebsitesList');
 
465
+    },
 
466
+  };
 
467
+
 
468
+  DesktopIntegrationOverlay.setIntegratedWebsites = function(entries) {
 
469
+    $('domains-list').setIntegratedWebsites(entries);
 
470
+  };
 
471
+
 
472
+  // Export
 
473
+  return {
 
474
+    IntegratedWebsitesListItem: IntegratedWebsitesListItem,
 
475
+    IntegratedWebsitesList: IntegratedWebsitesList,
 
476
+    DesktopIntegrationOverlay: DesktopIntegrationOverlay
 
477
+  };
 
478
+});
 
479
+
 
480
Index: chrome/browser/resources/options2/desktop_integration_overlay.css
 
481
===================================================================
 
482
--- chrome/browser/resources/options2/desktop_integration_overlay.css   (revision 0)
 
483
+++ chrome/browser/resources/options2/desktop_integration_overlay.css   (revision 0)
 
484
@@ -0,0 +1,71 @@
 
485
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
 
486
+ * Use of this source code is governed by a BSD-style license that can be
 
487
+ * found in the LICENSE file. */
 
488
+
 
489
+#desktop-integration-options {
 
490
+  min-width: 550px;
 
491
+}
 
492
+
 
493
+#desktop-integration-options list {
 
494
+  min-height: 172px;
 
495
+}
 
496
+
 
497
+.desktop-integration-list-item {
 
498
+  -webkit-box-flex: 1;
 
499
+  -webkit-padding-start: 8px;
 
500
+  overflow: hidden;
 
501
+  text-overflow: ellipsis;
 
502
+}
 
503
+
 
504
+.desktop-integration-lower-left button {
 
505
+  min-width: 70px;
 
506
+}
 
507
+
 
508
+.desktop-integration-lower-left {
 
509
+  -webkit-box-flex: 0;
 
510
+  -webkit-padding-start: 12px;
 
511
+  padding-bottom: 10px;
 
512
+}
 
513
+
 
514
+#desktop-integration-column-headers {
 
515
+  -webkit-margin-start: 17px;
 
516
+  display: -webkit-box;
 
517
+  margin-top: 17px;
 
518
+}
 
519
+
 
520
+#desktop-integration-column-headers > div {
 
521
+  font-weight: bold;
 
522
+}
 
523
+
 
524
+#desktop-integration-pattern-column {
 
525
+  -webkit-box-flex: 1;
 
526
+}
 
527
+
 
528
+#desktop-integration-behavior-column {
 
529
+  width: 145px;
 
530
+}
 
531
+
 
532
+#desktop-integration-area list {
 
533
+  margin-bottom: 10px;
 
534
+  margin-top: 4px;
 
535
+}
 
536
+
 
537
+#domains-list {
 
538
+  -webkit-box-flex: 1;
 
539
+  outline: none;
 
540
+  padding: 1px 0 0;
 
541
+  width: 100%;
 
542
+}
 
543
+
 
544
+#domains-list .domain-name {
 
545
+  -webkit-box-flex: 1;
 
546
+  overflow: hidden;
 
547
+  text-overflow: ellipsis;
 
548
+  white-space: nowrap;
 
549
+}
 
550
+
 
551
+#domains-list li {
 
552
+  -webkit-padding-start: 12px;
 
553
+  padding-bottom: 2px;
 
554
+  padding-top: 2px;
 
555
+}
 
556
Index: chrome/browser/resources/options2/browser_options.js
 
557
===================================================================
 
558
--- chrome/browser/resources/options2/browser_options.js        (revision 136242)
 
559
+++ chrome/browser/resources/options2/browser_options.js        (working copy)
 
560
@@ -397,6 +397,23 @@
 
561
             [String(event.target.options[event.target.selectedIndex].value)]);
 
562
       };
 
563
 
 
564
+      // Desktop integration section
 
565
+      if (cr.isLinux && !cr.isChromeOS) {
 
566
+        var updateButtonState = function () {
 
567
+          $('desktop-integration-button').disabled =
 
568
+            ! $('promptIntegrationForAnyWebsite').checked;
 
569
+        };
 
570
+        $('promptIntegrationForAnyWebsite').onchange = function () {
 
571
+          updateButtonState();
 
572
+          chrome.send('setDesktopIntegrationAllowed',
 
573
+                      [$('promptIntegrationForAnyWebsite').checked]);
 
574
+        };
 
575
+        updateButtonState();
 
576
+        $('desktop-integration-button').onclick = function(event) {
 
577
+          OptionsPage.navigateToPage('desktopIntegrationOverlay');
 
578
+        };
 
579
+      }
 
580
+
 
581
       // Languages section.
 
582
       $('language-button').onclick = function(event) {
 
583
         OptionsPage.navigateToPage('languages');
 
584
@@ -1022,6 +1039,24 @@
 
585
     },
 
586
 
 
587
     /**
 
588
+     * Disable the desktop integration settings if needed.
 
589
+     * @private
 
590
+     */
 
591
+    disableDesktopIntegration_: function() {
 
592
+      $('desktop-integration-section').style.display = 'none';
 
593
+    },
 
594
+
 
595
+    /**
 
596
+     * Disable the desktop integration settings if needed.
 
597
+     * @private
 
598
+     */
 
599
+    setDesktopIntegrationIsAllowed_: function(enabled) {
 
600
+      $('promptIntegrationForAnyWebsite').checked = enabled;
 
601
+      $('desktop-integration-button').disabled =
 
602
+        ! $('promptIntegrationForAnyWebsite').checked;
 
603
+    },
 
604
+
 
605
+    /**
 
606
      * Set the checked state of the metrics reporting checkbox.
 
607
      * @private
 
608
      */
 
609
@@ -1325,6 +1360,7 @@
 
610
   //Forward public APIs to private implementations.
 
611
   [
 
612
     'addBluetoothDevice',
 
613
+    'disableDesktopIntegration',
 
614
     'getStartStopSyncButton',
 
615
     'hideBluetoothSettings',
 
616
     'removeCloudPrintConnectorSection',
 
617
@@ -1338,6 +1374,7 @@
 
618
     'setGtkThemeButtonEnabled',
 
619
     'setHighContrastCheckboxState',
 
620
     'setInstantFieldTrialStatus',
 
621
+    'setDesktopIntegrationIsAllowed',
 
622
     'setMetricsReportingCheckboxState',
 
623
     'setMetricsReportingSettingVisibility',
 
624
     'setProfilesInfo',
 
625
Index: chrome/browser/ui/webui/options2/options_ui2.cc
 
626
===================================================================
 
627
--- chrome/browser/ui/webui/options2/options_ui2.cc     (revision 136242)
 
628
+++ chrome/browser/ui/webui/options2/options_ui2.cc     (working copy)
 
629
@@ -90,6 +90,10 @@
 
630
 #include "chrome/browser/ui/webui/options2/certificate_manager_handler2.h"
 
631
 #endif
 
632
 
 
633
+#if defined(OS_LINUX)
 
634
+#include "chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.h"
 
635
+#endif
 
636
+
 
637
 using content::RenderViewHost;
 
638
 
 
639
 namespace {
 
640
@@ -233,6 +237,10 @@
 
641
   AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler());
 
642
   AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler());
 
643
   AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler());
 
644
+#if defined(OS_LINUX)
 
645
+  AddOptionsPageUIHandler(localized_strings,
 
646
+                          new DesktopIntegrationSettingsHandler());
 
647
+#endif
 
648
   AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler());
 
649
   AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler());
 
650
   AddOptionsPageUIHandler(localized_strings, new WebIntentsSettingsHandler());
 
651
Index: chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.h
 
652
===================================================================
 
653
--- chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.h    (revision 0)
 
654
+++ chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.h    (revision 0)
 
655
@@ -0,0 +1,76 @@
 
656
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 
657
+// Use of this source code is governed by a BSD-style license that can be
 
658
+// found in the LICENSE file.
 
659
+
 
660
+#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_DESKTOP_INTEGRATION_SETTINGS_HANDLER2_H_
 
661
+#define CHROME_BROWSER_UI_WEBUI_OPTIONS2_DESKTOP_INTEGRATION_SETTINGS_HANDLER2_H_
 
662
+
 
663
+#include <string>
 
664
+
 
665
+#include "base/compiler_specific.h"
 
666
+#include "chrome/browser/ui/webui/options2/options_ui2.h"
 
667
+
 
668
+namespace base {
 
669
+class DictionaryValue;
 
670
+class ListValue;
 
671
+}
 
672
+
 
673
+namespace options2 {
 
674
+
 
675
+class DesktopIntegrationSettingsHandler : public OptionsPageUIHandler {
 
676
+ public:
 
677
+  DesktopIntegrationSettingsHandler();
 
678
+  virtual ~DesktopIntegrationSettingsHandler();
 
679
+
 
680
+  // OptionsPageUIHandler implementation.
 
681
+  virtual void GetLocalizedValues(
 
682
+      base::DictionaryValue* localized_strings) OVERRIDE;
 
683
+  virtual void InitializeHandler() OVERRIDE;
 
684
+  virtual void InitializePage() OVERRIDE;
 
685
+  virtual void RegisterMessages() OVERRIDE;
 
686
+
 
687
+ private:
 
688
+
 
689
+  // Loads the data associated with the currently integrated websites.
 
690
+  void LoadIntegratedWebsitesData();
 
691
+
 
692
+  // Initializes the list of website domain names that are currently
 
693
+  // either allowed or 'dontask' and send it to the overlay.
 
694
+  void LoadUnityWebappsEntryPoint();
 
695
+
 
696
+  // Removes an website from the list of integrated websites that won't prompt
 
697
+  // from integration.
 
698
+  // |args| - A string, the domain name of the website to remove.
 
699
+  void RemoveIntegrationSite(const ListValue* args);
 
700
+
 
701
+  // Adds an website from the list of integrated websites that won't prompt
 
702
+  // from integration. The website is being added to the list of 'allowed' sites.
 
703
+  // |args| - A string, the domain name of the website to add.
 
704
+  void AddIntegrationSite(const ListValue* args);
 
705
+
 
706
+  // Updates the integration allowed flag.
 
707
+  // |args| - A boolean flag indicating if integration should be allowed
 
708
+  void SetDesktopIntegrationAllowed(const ListValue* args);
 
709
+
 
710
+  // Updates the list of integrated websites.
 
711
+  void UpdateIntegratedWebsitesList(const ListValue* args);
 
712
+
 
713
+  // Predicate informing if we have been able to initialize the connection
 
714
+  // with the unity-webapps library (entry point for website integration
 
715
+  // permissions).
 
716
+  bool IsUnityWebappsInitialized() const;
 
717
+
 
718
+  // 
 
719
+  void * lib_unity_webapps_handle_;
 
720
+  void * get_all_func_handle_;
 
721
+  void * remove_from_permissions_func_handle_;
 
722
+  void * add_allowed_domain_func_handle_;
 
723
+  void * is_integration_allowed_func_handle_;
 
724
+  void * set_integration_allowed_func_handle_;
 
725
+
 
726
+  DISALLOW_COPY_AND_ASSIGN(DesktopIntegrationSettingsHandler);
 
727
+};
 
728
+
 
729
+}  // namespace options2
 
730
+
 
731
+#endif  // CHROME_BROWSER_UI_WEBUI_OPTIONS2_DESKTOP_INTEGRATION_SETTINGS_HANDLER2_H_
 
732
Index: chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.cc
 
733
===================================================================
 
734
--- chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.cc   (revision 0)
 
735
+++ chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.cc   (revision 0)
 
736
@@ -0,0 +1,257 @@
 
737
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 
738
+// Use of this source code is governed by a BSD-style license that can be
 
739
+// found in the LICENSE file.
 
740
+
 
741
+#include "chrome/browser/ui/webui/options2/desktop_integration_settings_handler2.h"
 
742
+
 
743
+#include <glib.h>
 
744
+#include <dlfcn.h>
 
745
+#include <vector>
 
746
+
 
747
+#include "base/bind.h"
 
748
+#include "base/bind_helpers.h"
 
749
+#include "base/logging.h"
 
750
+#include "base/string16.h"
 
751
+#include "base/string_number_conversions.h"
 
752
+#include "base/utf_string_conversions.h"
 
753
+#include "base/values.h"
 
754
+#include "chrome/browser/ui/webui/web_ui_util.h"
 
755
+#include "chrome/common/guid.h"
 
756
+#include "chrome/common/url_constants.h"
 
757
+#include "content/public/browser/web_ui.h"
 
758
+#include "grit/generated_resources.h"
 
759
+#include "grit/webkit_resources.h"
 
760
+#include "ui/base/l10n/l10n_util.h"
 
761
+
 
762
+namespace options2 {
 
763
+
 
764
+// TODO: -> extract to function
 
765
+DesktopIntegrationSettingsHandler::DesktopIntegrationSettingsHandler()
 
766
+    : lib_unity_webapps_handle_(NULL),
 
767
+      get_all_func_handle_(NULL),
 
768
+      remove_from_permissions_func_handle_(NULL),
 
769
+      add_allowed_domain_func_handle_(NULL),
 
770
+      is_integration_allowed_func_handle_(NULL) {
 
771
+}
 
772
+
 
773
+DesktopIntegrationSettingsHandler::~DesktopIntegrationSettingsHandler() {
 
774
+  if (lib_unity_webapps_handle_) {
 
775
+    dlclose (lib_unity_webapps_handle_);
 
776
+    lib_unity_webapps_handle_ = NULL;
 
777
+
 
778
+    remove_from_permissions_func_handle_ = NULL;
 
779
+    get_all_func_handle_ = NULL;
 
780
+    add_allowed_domain_func_handle_ = NULL;
 
781
+    is_integration_allowed_func_handle_ = NULL;
 
782
+  }
 
783
+}
 
784
+
 
785
+/////////////////////////////////////////////////////////////////////////////
 
786
+// OptionsPageUIHandler implementation:
 
787
+void DesktopIntegrationSettingsHandler::GetLocalizedValues(
 
788
+    DictionaryValue* localized_strings) {
 
789
+  DCHECK(localized_strings);
 
790
+
 
791
+  static OptionsStringResource resources[] = {
 
792
+    { "desktopIntegrationInfoText",
 
793
+      IDS_DESKTOP_INTEGRATION_SETTINGS_OVERLAY_DESCRIPTION },
 
794
+    { "desktopIntegrationColumnDescription",
 
795
+      IDS_DESKTOP_INTEGRATION_SETTINGS_OVERLAY_COLUMN_DESCRIPTION },
 
796
+  };
 
797
+
 
798
+  localized_strings->SetString("add_button",
 
799
+      l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_INTEGRATION_WEBSITE_ADD_BUTTON));
 
800
+  localized_strings->SetString("add_desktop_website_input_label",
 
801
+      l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_INTEGRATION_WEBSITE_ADD_TEXT));
 
802
+  localized_strings->SetString("add_desktop_website_title",
 
803
+      l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_INTEGRATION_WEBSITE_ADD_TITLE));
 
804
+
 
805
+  RegisterStrings(localized_strings, resources, arraysize(resources));
 
806
+  RegisterTitle(localized_strings, "desktopIntegrationPage",
 
807
+                IDS_DESKTOP_INTEGRATION_SETTINGS_OVERLAY_TITLE);
 
808
+}
 
809
+
 
810
+void DesktopIntegrationSettingsHandler::InitializeHandler() {
 
811
+  if (!IsUnityWebappsInitialized()) {
 
812
+    LoadUnityWebappsEntryPoint();
 
813
+  }
 
814
+}
 
815
+
 
816
+void DesktopIntegrationSettingsHandler::InitializePage() {
 
817
+  DCHECK(IsUnityWebappsInitialized());
 
818
+  LoadIntegratedWebsitesData();
 
819
+}
 
820
+
 
821
+void DesktopIntegrationSettingsHandler::RegisterMessages() {
 
822
+  web_ui()->RegisterMessageCallback(
 
823
+      "addIntegrationSite",
 
824
+      base::Bind(&DesktopIntegrationSettingsHandler::AddIntegrationSite,
 
825
+                 base::Unretained(this)));
 
826
+  web_ui()->RegisterMessageCallback(
 
827
+      "setDesktopIntegrationAllowed",
 
828
+      base::Bind(&DesktopIntegrationSettingsHandler::SetDesktopIntegrationAllowed,
 
829
+                 base::Unretained(this)));
 
830
+  web_ui()->RegisterMessageCallback(
 
831
+      "removeIntegrationSite",
 
832
+      base::Bind(&DesktopIntegrationSettingsHandler::RemoveIntegrationSite,
 
833
+                 base::Unretained(this)));
 
834
+  web_ui()->RegisterMessageCallback(
 
835
+      "updateIntegratedWebsitesList",
 
836
+      base::Bind(&DesktopIntegrationSettingsHandler::UpdateIntegratedWebsitesList,
 
837
+                 base::Unretained(this)));
 
838
+}
 
839
+
 
840
+void DesktopIntegrationSettingsHandler::LoadUnityWebappsEntryPoint() {
 
841
+  DCHECK(!IsUnityWebappsInitialized());
 
842
+
 
843
+  // TODO run on FILE thread
 
844
+  static const char* const search_paths[] = {
 
845
+    "/usr/local/lib/libunity_webapps.so.0"
 
846
+    , "/usr/lib/libunity_webapps.so.0"
 
847
+  };
 
848
+
 
849
+  void * handle = NULL;
 
850
+  for (size_t i = 0; i < sizeof(search_paths)/sizeof(search_paths[0]); ++i) {
 
851
+    DCHECK(handle == NULL);
 
852
+    // TODO validate path?
 
853
+    handle = dlopen (search_paths[i], RTLD_LAZY|RTLD_GLOBAL);
 
854
+    if (handle) {
 
855
+      LOG(ERROR) << "Found libunitywebapps entry point:" << search_paths[i];
 
856
+      break;
 
857
+    }
 
858
+  }
 
859
+  if (!handle) {
 
860
+    LOG(INFO) << "Could not load Unity Webapps entry point library";
 
861
+    return;
 
862
+  }
 
863
+
 
864
+  void * get_all_handle =
 
865
+    dlsym (handle, "unity_webapps_permissions_get_all_domains");
 
866
+  void * remove_from_permissions_handle =
 
867
+    dlsym (handle, "unity_webapps_permissions_remove_domain_from_permissions");
 
868
+  void * add_allowed_domain_handle =
 
869
+    dlsym (handle, "unity_webapps_permissions_allow_domain");
 
870
+  void * is_integration_allowed_handle =
 
871
+    dlsym (handle, "unity_webapps_permissions_is_integration_allowed");
 
872
+  void * set_integration_allowed_handle =
 
873
+    dlsym (handle, "unity_webapps_permissions_set_integration_allowed");
 
874
+
 
875
+  if (!get_all_handle ||
 
876
+      !remove_from_permissions_handle ||
 
877
+      !add_allowed_domain_handle ||
 
878
+      !is_integration_allowed_handle ||
 
879
+      !set_integration_allowed_handle) {
 
880
+    LOG(WARNING) << "Could not load Unity Webapps entry point functions";
 
881
+    dlclose(handle);
 
882
+    return;
 
883
+  }
 
884
+
 
885
+  lib_unity_webapps_handle_ = handle;
 
886
+  get_all_func_handle_ = get_all_handle;
 
887
+  remove_from_permissions_func_handle_ = remove_from_permissions_handle;
 
888
+  add_allowed_domain_func_handle_ = add_allowed_domain_handle;
 
889
+  is_integration_allowed_func_handle_ = is_integration_allowed_handle;
 
890
+  set_integration_allowed_func_handle_ = set_integration_allowed_handle;
 
891
+}
 
892
+
 
893
+bool DesktopIntegrationSettingsHandler::IsUnityWebappsInitialized() const {
 
894
+  return NULL != lib_unity_webapps_handle_
 
895
+    && NULL != get_all_func_handle_
 
896
+    && NULL != remove_from_permissions_func_handle_
 
897
+    && NULL != add_allowed_domain_func_handle_
 
898
+    && NULL != is_integration_allowed_func_handle_
 
899
+    && NULL != set_integration_allowed_func_handle_;
 
900
+}
 
901
+
 
902
+void DesktopIntegrationSettingsHandler::LoadIntegratedWebsitesData() {
 
903
+  if (!IsUnityWebappsInitialized()) {
 
904
+    web_ui()->CallJavascriptFunction(
 
905
+        "BrowserOptions.disableDesktopIntegration");
 
906
+    return;
 
907
+  }
 
908
+
 
909
+  typedef gboolean (* IsIntegrationAllowedFunc) (void);
 
910
+  gboolean isallowed =
 
911
+    ((IsIntegrationAllowedFunc) is_integration_allowed_func_handle_) ();
 
912
+  web_ui()->CallJavascriptFunction(
 
913
+       "BrowserOptions.setDesktopIntegrationIsAllowed",
 
914
+       base::FundamentalValue(isallowed));
 
915
+}
 
916
+
 
917
+void DesktopIntegrationSettingsHandler::UpdateIntegratedWebsitesList(
 
918
+    const ListValue* args) {
 
919
+  DCHECK(IsUnityWebappsInitialized());
 
920
+
 
921
+  // TODO move elsewhere
 
922
+  typedef gchar* (* GetAllDomainsFunc) (void);
 
923
+
 
924
+  gchar* all_domains = ((GetAllDomainsFunc) get_all_func_handle_) ();
 
925
+  if (all_domains) { 
 
926
+    web_ui()->CallJavascriptFunction(
 
927
+        "DesktopIntegrationOverlay.setIntegratedWebsites",
 
928
+        StringValue(all_domains));
 
929
+  }
 
930
+}
 
931
+
 
932
+void DesktopIntegrationSettingsHandler::SetDesktopIntegrationAllowed(
 
933
+    const ListValue* args) {
 
934
+  DCHECK(IsUnityWebappsInitialized());
 
935
+
 
936
+  // TODO move elsewhere
 
937
+  typedef void (* SetDesktopIntegrationAllowedFunc) (gboolean);
 
938
+
 
939
+  bool is_allowed;
 
940
+  if (!args->GetBoolean(0, &is_allowed)) {
 
941
+    NOTREACHED();
 
942
+    return;
 
943
+  }
 
944
+
 
945
+  LOG(INFO) << "Setting desktop integration:" << is_allowed;
 
946
+
 
947
+  ((SetDesktopIntegrationAllowedFunc) set_integration_allowed_func_handle_) (
 
948
+      is_allowed ? TRUE : FALSE);
 
949
+}
 
950
+
 
951
+void DesktopIntegrationSettingsHandler::AddIntegrationSite(
 
952
+    const ListValue* args) {
 
953
+  DCHECK(IsUnityWebappsInitialized());
 
954
+
 
955
+  // TODO move elsewhere
 
956
+  typedef void (* AddDomainFromPermissionsFunc) (gchar *);
 
957
+
 
958
+  std::string domain;
 
959
+  if (!args->GetString(0, &domain)) {
 
960
+    NOTREACHED();
 
961
+    return;
 
962
+  }
 
963
+
 
964
+  LOG(INFO) << "Adding domain:" << domain << " to the list of websites allowed";
 
965
+
 
966
+  ((AddDomainFromPermissionsFunc) add_allowed_domain_func_handle_) (
 
967
+      const_cast<gchar *>(domain.c_str()));
 
968
+
 
969
+  LoadIntegratedWebsitesData ();
 
970
+}
 
971
+
 
972
+void DesktopIntegrationSettingsHandler::RemoveIntegrationSite(
 
973
+    const ListValue* args) {
 
974
+  DCHECK(IsUnityWebappsInitialized());
 
975
+
 
976
+  // TODO move elsewhere
 
977
+  typedef void (* RemoveDomainFromPermissionsFunc) (gchar *);
 
978
+
 
979
+  std::string domain;
 
980
+  if (!args->GetString(0, &domain)) {
 
981
+    NOTREACHED();
 
982
+    return;
 
983
+  }
 
984
+
 
985
+  LOG(INFO) << "Removing domain:" << domain << " from the list of websites not prompting integration";
 
986
+
 
987
+  ((RemoveDomainFromPermissionsFunc) remove_from_permissions_func_handle_) (
 
988
+      const_cast<gchar *>(domain.c_str()));
 
989
+
 
990
+  LoadIntegratedWebsitesData ();
 
991
+}
 
992
+
 
993
+}  // namespace options2
 
994
Index: chrome/browser/ui/webui/options2/browser_options_handler2.cc
 
995
===================================================================
 
996
--- chrome/browser/ui/webui/options2/browser_options_handler2.cc        (revision 136242)
 
997
+++ chrome/browser/ui/webui/options2/browser_options_handler2.cc        (working copy)
 
998
@@ -152,6 +152,8 @@
 
999
     { "advancedSectionTitleCloudPrint", IDS_GOOGLE_CLOUD_PRINT },
 
1000
     { "advancedSectionTitleContent",
 
1001
       IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT },
 
1002
+    { "advancedSectionTitleIntegration",
 
1003
+      IDS_OPTIONS_ADVANCED_SECTION_TITLE_INTEGRATION },
 
1004
     { "advancedSectionTitleLanguages",
 
1005
       IDS_OPTIONS_ADVANCED_SECTION_TITLE_LANGUAGES },
 
1006
     { "advancedSectionTitleNetwork",
 
1007
@@ -171,6 +173,8 @@
 
1008
     { "defaultFontSizeLabel", IDS_OPTIONS_DEFAULT_FONT_SIZE_LABEL },
 
1009
     { "defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES },
 
1010
     { "defaultZoomFactorLabel", IDS_OPTIONS_DEFAULT_ZOOM_LEVEL_LABEL },
 
1011
+    { "desktopIntegrationExceptionsSettingsButton",
 
1012
+      IDS_DESKTOP_INTEGRATION_SETTINGS_EXCEPTIONS_BUTTON_LABEL },
 
1013
 #if defined(OS_CHROMEOS)
 
1014
     { "disableGData", IDS_OPTIONS_DISABLE_GDATA },
 
1015
 #endif
 
1016
@@ -222,6 +226,8 @@
 
1017
     { "profilesDeleteSingle", IDS_PROFILES_DELETE_SINGLE_BUTTON_LABEL },
 
1018
     { "profilesListItemCurrent", IDS_PROFILES_LIST_ITEM_CURRENT },
 
1019
     { "profilesManage", IDS_PROFILES_MANAGE_BUTTON_LABEL },
 
1020
+    { "promptIntegrationEnableIntegration",
 
1021
+      IDS_PROMPT_INTEGRATION_ENABLE_BUTTON_LABEL },
 
1022
     { "proxiesLabel", IDS_OPTIONS_PROXIES_LABEL },
 
1023
     { "safeBrowsingEnableProtection",
 
1024
       IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION },