| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |