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

Side by Side Diff: chrome/browser/ui/views/location_bar/page_action_image_view.cc

Issue 561023002: Use the wrench menu as a reference view for overflowed extension actions' popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ Created 6 years, 3 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/location_bar/page_action_image_view.h" 5 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_action.h" 8 #include "chrome/browser/extensions/extension_action.h"
9 #include "chrome/browser/platform_util.h" 9 #include "chrome/browser/platform_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 views::FocusManager* PageActionImageView::GetFocusManagerForAccelerator() { 133 views::FocusManager* PageActionImageView::GetFocusManagerForAccelerator() {
134 return owner_->GetFocusManager(); 134 return owner_->GetFocusManager();
135 } 135 }
136 136
137 views::Widget* PageActionImageView::GetParentForContextMenu() { 137 views::Widget* PageActionImageView::GetParentForContextMenu() {
138 return GetWidget(); 138 return GetWidget();
139 } 139 }
140 140
141 ExtensionActionViewController*
142 PageActionImageView::GetPreferredPopupViewController() {
143 return view_controller_.get();
144 }
145
141 views::View* PageActionImageView::GetReferenceViewForPopup() { 146 views::View* PageActionImageView::GetReferenceViewForPopup() {
142 return this; 147 return this;
143 } 148 }
144 149
145 content::WebContents* PageActionImageView::GetCurrentWebContents() { 150 content::WebContents* PageActionImageView::GetCurrentWebContents() {
146 return owner_->GetWebContents(); 151 return owner_->GetWebContents();
147 } 152 }
148 153
149 void PageActionImageView::HideActivePopup() { 154 void PageActionImageView::HideActivePopup() {
150 // The only popup that will be active is this popup. 155 // The only popup that will be active is this popup.
151 view_controller_->HidePopup(); 156 view_controller_->HidePopup();
152 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.h ('k') | chrome/browser/ui/views/toolbar/browser_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698