| OLD | NEW |
| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 InsertThemedToolstripCSS(); | 432 InsertThemedToolstripCSS(); |
| 433 | 433 |
| 434 // Listen for browser changes so we can resend the CSS. | 434 // Listen for browser changes so we can resend the CSS. |
| 435 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, | 435 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, |
| 436 NotificationService::AllSources()); | 436 NotificationService::AllSources()); |
| 437 break; | 437 break; |
| 438 default: | 438 default: |
| 439 break; // No style sheet for other types, at the moment. | 439 break; // No style sheet for other types, at the moment. |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 } |
| 442 | 443 |
| 444 void ExtensionHost::DocumentOnLoadCompletedInMainFrame(RenderViewHost* rvh) { |
| 443 if (ViewType::EXTENSION_POPUP == GetRenderViewType()) { | 445 if (ViewType::EXTENSION_POPUP == GetRenderViewType()) { |
| 444 NotificationService::current()->Notify( | 446 NotificationService::current()->Notify( |
| 445 NotificationType::EXTENSION_POPUP_VIEW_READY, | 447 NotificationType::EXTENSION_POPUP_VIEW_READY, |
| 446 Source<Profile>(profile_), | 448 Source<Profile>(profile_), |
| 447 Details<ExtensionHost>(this)); | 449 Details<ExtensionHost>(this)); |
| 448 } | 450 } |
| 449 } | 451 } |
| 450 | 452 |
| 451 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message, | 453 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message, |
| 452 const std::wstring& default_prompt, | 454 const std::wstring& default_prompt, |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 // Extensions hosted in ExternalTabContainer objects may not have | 728 // Extensions hosted in ExternalTabContainer objects may not have |
| 727 // an associated browser. | 729 // an associated browser. |
| 728 Browser* browser = GetBrowser(); | 730 Browser* browser = GetBrowser(); |
| 729 if (browser) | 731 if (browser) |
| 730 window_id = ExtensionTabUtil::GetWindowId(browser); | 732 window_id = ExtensionTabUtil::GetWindowId(browser); |
| 731 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { | 733 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { |
| 732 NOTREACHED(); | 734 NOTREACHED(); |
| 733 } | 735 } |
| 734 return window_id; | 736 return window_id; |
| 735 } | 737 } |
| OLD | NEW |