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

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

Issue 6334101: Removal of chrome.experimental.popup set of APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/extensions/extension_popup.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 gfx::Point origin(screen_bounds.origin()); 82 gfx::Point origin(screen_bounds.origin());
83 View::ConvertPointToScreen(this, &origin); 83 View::ConvertPointToScreen(this, &origin);
84 screen_bounds.set_origin(origin); 84 screen_bounds.set_origin(origin);
85 85
86 BubbleBorder::ArrowLocation arrow_location = base::i18n::IsRTL() ? 86 BubbleBorder::ArrowLocation arrow_location = base::i18n::IsRTL() ?
87 BubbleBorder::TOP_LEFT : BubbleBorder::TOP_RIGHT; 87 BubbleBorder::TOP_LEFT : BubbleBorder::TOP_RIGHT;
88 88
89 popup_ = ExtensionPopup::Show( 89 popup_ = ExtensionPopup::Show(
90 page_action_->GetPopupUrl(current_tab_id_), 90 page_action_->GetPopupUrl(current_tab_id_),
91 browser, 91 browser,
92 browser->profile(),
93 browser->window()->GetNativeHandle(),
94 screen_bounds, 92 screen_bounds,
95 arrow_location, 93 arrow_location,
96 true, // Activate the popup window.
97 inspect_with_devtools, 94 inspect_with_devtools,
98 ExtensionPopup::BUBBLE_CHROME,
99 this); // ExtensionPopup::Observer 95 this); // ExtensionPopup::Observer
100 } else { 96 } else {
101 ExtensionService* service = profile_->GetExtensionService(); 97 ExtensionService* service = profile_->GetExtensionService();
102 service->browser_event_router()->PageActionExecuted( 98 service->browser_event_router()->PageActionExecuted(
103 profile_, page_action_->extension_id(), page_action_->id(), 99 profile_, page_action_->extension_id(), page_action_->id(),
104 current_tab_id_, current_url_.spec(), button); 100 current_tab_id_, current_url_.spec(), button);
105 } 101 }
106 } 102 }
107 103
108 AccessibilityTypes::Role PageActionImageView::GetAccessibleRole() { 104 AccessibilityTypes::Role PageActionImageView::GetAccessibleRole() {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 void PageActionImageView::ExtensionPopupIsClosing(ExtensionPopup* popup) { 236 void PageActionImageView::ExtensionPopupIsClosing(ExtensionPopup* popup) {
241 DCHECK_EQ(popup_, popup); 237 DCHECK_EQ(popup_, popup);
242 // ExtensionPopup is ref-counted, so we don't need to delete it. 238 // ExtensionPopup is ref-counted, so we don't need to delete it.
243 popup_ = NULL; 239 popup_ = NULL;
244 } 240 }
245 241
246 void PageActionImageView::HidePopup() { 242 void PageActionImageView::HidePopup() {
247 if (popup_) 243 if (popup_)
248 popup_->Close(); 244 popup_->Close();
249 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698