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

Unified Diff: chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc

Issue 9968076: Remove Inspect Popup command from browser actions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Views compile failure Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
diff --git a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
index 59cddd2d98dc94b051873fb65b432e0238cf6c68..89b45ad9b006df2072fb4d784e95fc36ede1ec22 100644
--- a/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc
@@ -41,13 +41,12 @@ const int ExtensionPopupGtk::kMaxHeight = 600;
ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser,
ExtensionHost* host,
- GtkWidget* anchor,
- bool inspect)
+ GtkWidget* anchor)
: browser_(browser),
bubble_(NULL),
host_(host),
anchor_(anchor),
- being_inspected_(inspect),
+ being_inspected_(false),
weak_factory_(this) {
host_->view()->SetContainer(this);
@@ -66,10 +65,8 @@ ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser,
registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING,
content::Source<Profile>(host->profile()));
- if (!being_inspected_) {
- registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_OPENING,
- content::Source<Profile>(host->profile()));
- }
+ registrar_.Add(this, content::NOTIFICATION_DEVTOOLS_WINDOW_OPENING,
+ content::Source<Profile>(host->profile()));
}
ExtensionPopupGtk::~ExtensionPopupGtk() {
@@ -77,7 +74,7 @@ ExtensionPopupGtk::~ExtensionPopupGtk() {
// static
void ExtensionPopupGtk::Show(const GURL& url, Browser* browser,
- GtkWidget* anchor, bool inspect) {
+ GtkWidget* anchor) {
ExtensionProcessManager* manager =
browser->profile()->GetExtensionProcessManager();
DCHECK(manager);
@@ -86,7 +83,7 @@ void ExtensionPopupGtk::Show(const GURL& url, Browser* browser,
ExtensionHost* host = manager->CreatePopupHost(url, browser);
// This object will delete itself when the bubble is closed.
- new ExtensionPopupGtk(browser, host, anchor, inspect);
+ new ExtensionPopupGtk(browser, host, anchor);
}
void ExtensionPopupGtk::Observe(int type,
@@ -110,6 +107,8 @@ void ExtensionPopupGtk::Observe(int type,
// Make sure that the popup won't go away when the inspector is activated.
if (bubble_)
bubble_->StopGrabbingInput();
+
+ being_inspected_ = true;
break;
case content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING:
// Make sure it's the devtools window that is inspecting our popup.
@@ -162,9 +161,6 @@ void ExtensionPopupGtk::ShowPopup() {
return;
}
- if (being_inspected_)
- DevToolsWindow::OpenDevToolsWindow(host_->render_view_host());
-
// Only one instance should be showing at a time. Get rid of the old one, if
// any. Typically, |current_extension_popup_| will be NULL, but it can be
// non-NULL if a browser action button is clicked while another extension
@@ -185,7 +181,7 @@ void ExtensionPopupGtk::ShowPopup() {
host_->view()->native_view(),
arrow_location,
false, // match_system_theme
- !being_inspected_, // grab_input
+ true, // grab_input
ThemeServiceGtk::GetFrom(browser_->profile()),
this);
}
« no previous file with comments | « chrome/browser/ui/gtk/extensions/extension_popup_gtk.h ('k') | chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698