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

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

Issue 6125003: Make ExtensionBrowserEventRouter owned by ExtensionService.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_list.h" 8 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/extensions/extension_browser_event_router.h" 9 #include "chrome/browser/extensions/extension_browser_event_router.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 browser, 91 browser,
92 browser->profile(), 92 browser->profile(),
93 browser->window()->GetNativeHandle(), 93 browser->window()->GetNativeHandle(),
94 screen_bounds, 94 screen_bounds,
95 arrow_location, 95 arrow_location,
96 true, // Activate the popup window. 96 true, // Activate the popup window.
97 inspect_with_devtools, 97 inspect_with_devtools,
98 ExtensionPopup::BUBBLE_CHROME, 98 ExtensionPopup::BUBBLE_CHROME,
99 this); // ExtensionPopup::Observer 99 this); // ExtensionPopup::Observer
100 } else { 100 } else {
101 ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted( 101 ExtensionService* service = profile_->GetExtensionService();
102 service->browser_event_router()->PageActionExecuted(
102 profile_, page_action_->extension_id(), page_action_->id(), 103 profile_, page_action_->extension_id(), page_action_->id(),
103 current_tab_id_, current_url_.spec(), button); 104 current_tab_id_, current_url_.spec(), button);
104 } 105 }
105 } 106 }
106 107
107 AccessibilityTypes::Role PageActionImageView::GetAccessibleRole() { 108 AccessibilityTypes::Role PageActionImageView::GetAccessibleRole() {
108 return AccessibilityTypes::ROLE_PUSHBUTTON; 109 return AccessibilityTypes::ROLE_PUSHBUTTON;
109 } 110 }
110 111
111 bool PageActionImageView::OnMousePressed(const views::MouseEvent& event) { 112 bool PageActionImageView::OnMousePressed(const views::MouseEvent& event) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 void PageActionImageView::ExtensionPopupIsClosing(ExtensionPopup* popup) { 238 void PageActionImageView::ExtensionPopupIsClosing(ExtensionPopup* popup) {
238 DCHECK_EQ(popup_, popup); 239 DCHECK_EQ(popup_, popup);
239 // ExtensionPopup is ref-counted, so we don't need to delete it. 240 // ExtensionPopup is ref-counted, so we don't need to delete it.
240 popup_ = NULL; 241 popup_ = NULL;
241 } 242 }
242 243
243 void PageActionImageView::HidePopup() { 244 void PageActionImageView::HidePopup() {
244 if (popup_) 245 if (popup_)
245 popup_->Close(); 246 popup_->Close();
246 } 247 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698