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

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

Issue 1168383002: Implement sidebar support for extension action popups Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_view_host.h" 5 #include "chrome/browser/extensions/extension_view_host.h"
6 6
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/extension_view.h" 9 #include "chrome/browser/extensions/extension_view.h"
10 #include "chrome/browser/extensions/window_controller.h" 10 #include "chrome/browser/extensions/window_controller.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 ExtensionViewHost::ExtensionViewHost( 57 ExtensionViewHost::ExtensionViewHost(
58 const Extension* extension, 58 const Extension* extension,
59 content::SiteInstance* site_instance, 59 content::SiteInstance* site_instance,
60 const GURL& url, 60 const GURL& url,
61 ViewType host_type) 61 ViewType host_type)
62 : ExtensionHost(extension, site_instance, url, host_type), 62 : ExtensionHost(extension, site_instance, url, host_type),
63 associated_web_contents_(NULL) { 63 associated_web_contents_(NULL) {
64 // Not used for panels, see PanelHost. 64 // Not used for panels, see PanelHost.
65 DCHECK(host_type == VIEW_TYPE_EXTENSION_DIALOG || 65 DCHECK(host_type == VIEW_TYPE_EXTENSION_DIALOG ||
66 host_type == VIEW_TYPE_EXTENSION_POPUP); 66 host_type == VIEW_TYPE_EXTENSION_POPUP ||
67 host_type == VIEW_TYPE_EXTENSION_SIDEBAR);
67 } 68 }
68 69
69 ExtensionViewHost::~ExtensionViewHost() { 70 ExtensionViewHost::~ExtensionViewHost() {
70 // The hosting WebContents will be deleted in the base class, so unregister 71 // The hosting WebContents will be deleted in the base class, so unregister
71 // this object before it deletes the attached WebContentsModalDialogManager. 72 // this object before it deletes the attached WebContentsModalDialogManager.
72 WebContentsModalDialogManager* manager = 73 WebContentsModalDialogManager* manager =
73 WebContentsModalDialogManager::FromWebContents(host_contents()); 74 WebContentsModalDialogManager::FromWebContents(host_contents());
74 if (manager) 75 if (manager)
75 manager->SetDelegate(NULL); 76 manager->SetDelegate(NULL);
76 } 77 }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 const content::NotificationSource& source, 297 const content::NotificationSource& source,
297 const content::NotificationDetails& details) { 298 const content::NotificationDetails& details) {
298 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY); 299 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY);
299 DCHECK(ExtensionSystem::Get(browser_context()) 300 DCHECK(ExtensionSystem::Get(browser_context())
300 ->runtime_data() 301 ->runtime_data()
301 ->IsBackgroundPageReady(extension())); 302 ->IsBackgroundPageReady(extension()));
302 LoadInitialURL(); 303 LoadInitialURL();
303 } 304 }
304 305
305 } // namespace extensions 306 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698