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

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

Issue 1512007: Disallow display of multiple experimental.extension.popup(...) windows (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 InsertThemedToolstripCSS(); 433 InsertThemedToolstripCSS();
434 434
435 // Listen for browser changes so we can resend the CSS. 435 // Listen for browser changes so we can resend the CSS.
436 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, 436 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
437 NotificationService::AllSources()); 437 NotificationService::AllSources());
438 break; 438 break;
439 default: 439 default:
440 break; // No style sheet for other types, at the moment. 440 break; // No style sheet for other types, at the moment.
441 } 441 }
442 } 442 }
443 }
443 444
445 void ExtensionHost::DocumentOnLoadCompletedInMainFrame(RenderViewHost* rvh) {
444 if (ViewType::EXTENSION_POPUP == GetRenderViewType()) { 446 if (ViewType::EXTENSION_POPUP == GetRenderViewType()) {
445 NotificationService::current()->Notify( 447 NotificationService::current()->Notify(
446 NotificationType::EXTENSION_POPUP_VIEW_READY, 448 NotificationType::EXTENSION_POPUP_VIEW_READY,
447 Source<Profile>(profile_), 449 Source<Profile>(profile_),
448 Details<ExtensionHost>(this)); 450 Details<ExtensionHost>(this));
449 } 451 }
450 } 452 }
451 453
452 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message, 454 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message,
453 const std::wstring& default_prompt, 455 const std::wstring& default_prompt,
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 // Extensions hosted in ExternalTabContainer objects may not have 722 // Extensions hosted in ExternalTabContainer objects may not have
721 // an associated browser. 723 // an associated browser.
722 Browser* browser = GetBrowser(); 724 Browser* browser = GetBrowser();
723 if (browser) 725 if (browser)
724 window_id = ExtensionTabUtil::GetWindowId(browser); 726 window_id = ExtensionTabUtil::GetWindowId(browser);
725 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { 727 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) {
726 NOTREACHED(); 728 NOTREACHED();
727 } 729 }
728 return window_id; 730 return window_id;
729 } 731 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_popup_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698