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

Side by Side Diff: chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc

Issue 7492051: Revert 94332 - Removal of Profile from content part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
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/ui/gtk/extensions/extension_popup_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void ExtensionPopupGtk::ShowPopup() { 93 void ExtensionPopupGtk::ShowPopup() {
94 if (bubble_) { 94 if (bubble_) {
95 NOTREACHED(); 95 NOTREACHED();
96 return; 96 return;
97 } 97 }
98 98
99 if (being_inspected_) { 99 if (being_inspected_) {
100 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host()); 100 DevToolsWindow::OpenDevToolsWindow(host_->render_view_host());
101 // Listen for the the devtools window closing. 101 // Listen for the the devtools window closing.
102 registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, 102 registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
103 Source<content::BrowserContext>(host_->profile())); 103 Source<Profile>(host_->profile()));
104 } 104 }
105 105
106 // Only one instance should be showing at a time. Get rid of the old one, if 106 // Only one instance should be showing at a time. Get rid of the old one, if
107 // any. Typically, |current_extension_popup_| will be NULL, but it can be 107 // any. Typically, |current_extension_popup_| will be NULL, but it can be
108 // non-NULL if a browser action button is clicked while another extension 108 // non-NULL if a browser action button is clicked while another extension
109 // popup's extension host is still loading. 109 // popup's extension host is still loading.
110 if (current_extension_popup_) 110 if (current_extension_popup_)
111 current_extension_popup_->DestroyPopup(); 111 current_extension_popup_->DestroyPopup();
112 current_extension_popup_ = this; 112 current_extension_popup_ = this;
113 113
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return; 164 return;
165 165
166 ExtensionHost* host = manager->CreatePopupHost(url, browser); 166 ExtensionHost* host = manager->CreatePopupHost(url, browser);
167 // This object will delete itself when the bubble is closed. 167 // This object will delete itself when the bubble is closed.
168 new ExtensionPopupGtk(browser, host, anchor, inspect); 168 new ExtensionPopupGtk(browser, host, anchor, inspect);
169 } 169 }
170 170
171 gfx::Rect ExtensionPopupGtk::GetViewBounds() { 171 gfx::Rect ExtensionPopupGtk::GetViewBounds() {
172 return gfx::Rect(host_->view()->native_view()->allocation); 172 return gfx::Rect(host_->view()->native_view()->allocation);
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698