| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |