Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 525016: Update RenderPreferences on GTK change. (Closed)
Patch Set: style nit Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/main_menu.cc ('k') | chrome/browser/gtk/gtk_theme_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 void ExtensionHost::Close(RenderViewHost* render_view_host) { 421 void ExtensionHost::Close(RenderViewHost* render_view_host) {
422 if (extension_host_type_ == ViewType::EXTENSION_POPUP) { 422 if (extension_host_type_ == ViewType::EXTENSION_POPUP) {
423 NotificationService::current()->Notify( 423 NotificationService::current()->Notify(
424 NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE, 424 NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE,
425 Source<Profile>(profile_), 425 Source<Profile>(profile_),
426 Details<ExtensionHost>(this)); 426 Details<ExtensionHost>(this));
427 } 427 }
428 } 428 }
429 429
430 RendererPreferences ExtensionHost::GetRendererPrefs(Profile* profile) const { 430 RendererPreferences ExtensionHost::GetRendererPrefs(Profile* profile) const {
431 return renderer_preferences_util::GetInitedRendererPreferences(profile); 431 RendererPreferences preferences;
432 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile);
433 return preferences;
432 } 434 }
433 435
434 WebPreferences ExtensionHost::GetWebkitPrefs() { 436 WebPreferences ExtensionHost::GetWebkitPrefs() {
435 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); 437 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs();
436 const bool kIsDomUI = true; 438 const bool kIsDomUI = true;
437 WebPreferences webkit_prefs = 439 WebPreferences webkit_prefs =
438 RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI); 440 RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI);
439 if (extension_host_type_ == ViewType::EXTENSION_POPUP) 441 if (extension_host_type_ == ViewType::EXTENSION_POPUP)
440 webkit_prefs.allow_scripts_to_close_windows = true; 442 webkit_prefs.allow_scripts_to_close_windows = true;
441 return webkit_prefs; 443 return webkit_prefs;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 // Extensions hosted in ExternalTabContainer objects may not have 632 // Extensions hosted in ExternalTabContainer objects may not have
631 // an associated browser. 633 // an associated browser.
632 Browser* browser = GetBrowser(); 634 Browser* browser = GetBrowser();
633 if (browser) 635 if (browser)
634 window_id = ExtensionTabUtil::GetWindowId(browser); 636 window_id = ExtensionTabUtil::GetWindowId(browser);
635 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { 637 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) {
636 NOTREACHED(); 638 NOTREACHED();
637 } 639 }
638 return window_id; 640 return window_id;
639 } 641 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/main_menu.cc ('k') | chrome/browser/gtk/gtk_theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698