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

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

Issue 660349: First cut at custom user style sheets. (Closed)
Patch Set: compile Created 10 years, 9 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 | « no previous file | chrome/browser/profile.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 } 462 }
463 } 463 }
464 464
465 RendererPreferences ExtensionHost::GetRendererPrefs(Profile* profile) const { 465 RendererPreferences ExtensionHost::GetRendererPrefs(Profile* profile) const {
466 RendererPreferences preferences; 466 RendererPreferences preferences;
467 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile); 467 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile);
468 return preferences; 468 return preferences;
469 } 469 }
470 470
471 WebPreferences ExtensionHost::GetWebkitPrefs() { 471 WebPreferences ExtensionHost::GetWebkitPrefs() {
472 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); 472 Profile* profile = render_view_host()->process()->profile();
473 const bool kIsDomUI = true; 473 const bool kIsDomUI = true;
474 WebPreferences webkit_prefs = 474 WebPreferences webkit_prefs =
475 RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI); 475 RenderViewHostDelegateHelper::GetWebkitPrefs(profile, kIsDomUI);
476 if (extension_host_type_ == ViewType::EXTENSION_POPUP) 476 if (extension_host_type_ == ViewType::EXTENSION_POPUP)
477 webkit_prefs.allow_scripts_to_close_windows = true; 477 webkit_prefs.allow_scripts_to_close_windows = true;
478 return webkit_prefs; 478 return webkit_prefs;
479 } 479 }
480 480
481 void ExtensionHost::ProcessDOMUIMessage(const std::string& message, 481 void ExtensionHost::ProcessDOMUIMessage(const std::string& message,
482 const Value* content, 482 const Value* content,
483 int request_id, 483 int request_id,
484 bool has_callback) { 484 bool has_callback) {
485 if (extension_function_dispatcher_.get()) { 485 if (extension_function_dispatcher_.get()) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 // Extensions hosted in ExternalTabContainer objects may not have 690 // Extensions hosted in ExternalTabContainer objects may not have
691 // an associated browser. 691 // an associated browser.
692 Browser* browser = GetBrowser(); 692 Browser* browser = GetBrowser();
693 if (browser) 693 if (browser)
694 window_id = ExtensionTabUtil::GetWindowId(browser); 694 window_id = ExtensionTabUtil::GetWindowId(browser);
695 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { 695 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) {
696 NOTREACHED(); 696 NOTREACHED();
697 } 697 }
698 return window_id; 698 return window_id;
699 } 699 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698