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

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

Issue 8432011: Move RendererPreferences to content/public/common and also put in the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/instant/instant_loader.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG || 503 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
504 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE || 504 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
505 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) { 505 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
506 content::NotificationService::current()->Notify( 506 content::NotificationService::current()->Notify(
507 chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, 507 chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
508 content::Source<Profile>(profile_), 508 content::Source<Profile>(profile_),
509 content::Details<ExtensionHost>(this)); 509 content::Details<ExtensionHost>(this));
510 } 510 }
511 } 511 }
512 512
513 RendererPreferences ExtensionHost::GetRendererPrefs( 513 content::RendererPreferences ExtensionHost::GetRendererPrefs(
514 content::BrowserContext* browser_context) const { 514 content::BrowserContext* browser_context) const {
515 Profile* profile = Profile::FromBrowserContext(browser_context); 515 Profile* profile = Profile::FromBrowserContext(browser_context);
516 RendererPreferences preferences; 516 content::RendererPreferences preferences;
517 517
518 TabContents* associated_contents = GetAssociatedTabContents(); 518 TabContents* associated_contents = GetAssociatedTabContents();
519 if (associated_contents) 519 if (associated_contents)
520 preferences = 520 preferences =
521 static_cast<RenderViewHostDelegate*>(associated_contents)-> 521 static_cast<RenderViewHostDelegate*>(associated_contents)->
522 GetRendererPrefs(profile); 522 GetRendererPrefs(profile);
523 523
524 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile); 524 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile);
525 return preferences; 525 return preferences;
526 } 526 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) { 802 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
803 if (view_.get()) 803 if (view_.get())
804 view_->RenderViewCreated(); 804 view_->RenderViewCreated();
805 805
806 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP || 806 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
807 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) { 807 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
808 render_view_host->EnablePreferredSizeMode( 808 render_view_host->EnablePreferredSizeMode(
809 kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow); 809 kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow);
810 } 810 }
811 } 811 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698