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

Side by Side Diff: chrome/browser/ui/views/infobars/extension_infobar.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/infobars/extension_infobar.h" 5 #include "chrome/browser/ui/views/infobars/extension_infobar.h"
6 6
7 #include "chrome/browser/extensions/extension_context_menu_model.h" 7 #include "chrome/browser/extensions/extension_context_menu_model.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_infobar_delegate.h" 9 #include "chrome/browser/extensions/extension_infobar_delegate.h"
10 #include "chrome/browser/platform_util.h" 10 #include "chrome/browser/platform_util.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 void ExtensionInfoBar::OnMenuButtonClicked(views::View* source, 141 void ExtensionInfoBar::OnMenuButtonClicked(views::View* source,
142 const gfx::Point& point) { 142 const gfx::Point& point) {
143 if (!owned()) 143 if (!owned())
144 return; // We're closing; don't call anything, it might access the owner. 144 return; // We're closing; don't call anything, it might access the owner.
145 const Extension* extension = GetDelegate()->extension_host()->extension(); 145 const Extension* extension = GetDelegate()->extension_host()->extension();
146 if (!extension->ShowConfigureContextMenus()) 146 if (!extension->ShowConfigureContextMenus())
147 return; 147 return;
148 148
149 scoped_refptr<ExtensionContextMenuModel> options_menu_contents = 149 scoped_refptr<ExtensionContextMenuModel> options_menu_contents =
150 new ExtensionContextMenuModel(extension, browser_, NULL); 150 new ExtensionContextMenuModel(extension, browser_);
151 DCHECK_EQ(menu_, source); 151 DCHECK_EQ(menu_, source);
152 RunMenuAt(options_menu_contents.get(), menu_, views::MenuItemView::TOPLEFT); 152 RunMenuAt(options_menu_contents.get(), menu_, views::MenuItemView::TOPLEFT);
153 } 153 }
154 154
155 ExtensionInfoBarDelegate* ExtensionInfoBar::GetDelegate() { 155 ExtensionInfoBarDelegate* ExtensionInfoBar::GetDelegate() {
156 return delegate_ ? delegate_->AsExtensionInfoBarDelegate() : NULL; 156 return delegate_ ? delegate_->AsExtensionInfoBarDelegate() : NULL;
157 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.h ('k') | chrome/browser/ui/views/location_bar/page_action_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698