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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm

Issue 869873008: [Extensions Toolbar] Move some popup logic to be platform-agnostic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avi's Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm b/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
index 5ad9e1c8616a7d822f5f594c13be7d5292cb0a05..63125a29134c5d2abcc1c94cc17b586c421ae067 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
@@ -77,10 +77,6 @@ void ExtensionActionPlatformDelegateCocoa::OnDelegateSet() {
content::Source<Profile>(controller_->browser()->profile()));
}
-bool ExtensionActionPlatformDelegateCocoa::IsShowingPopup() const {
- return GetPopup() != nil;
-}
-
void ExtensionActionPlatformDelegateCocoa::CloseActivePopup() {
ExtensionPopupController* popup = [ExtensionPopupController popup];
if (popup && ![popup isClosing])
@@ -89,12 +85,12 @@ void ExtensionActionPlatformDelegateCocoa::CloseActivePopup() {
void ExtensionActionPlatformDelegateCocoa::CloseOwnPopup() {
ExtensionPopupController* popup = GetPopup();
- DCHECK(popup);
if (popup && ![popup isClosing])
[popup close];
}
-bool ExtensionActionPlatformDelegateCocoa::ShowPopupWithUrl(
+extensions::ExtensionViewHost*
+ExtensionActionPlatformDelegateCocoa::ShowPopupWithUrl(
ExtensionActionViewController::PopupShowAction show_action,
const GURL& popup_url,
bool grant_tab_permissions) {
@@ -112,12 +108,13 @@ bool ExtensionActionPlatformDelegateCocoa::ShowPopupWithUrl(
BOOL devMode =
show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT;
- [ExtensionPopupController showURL:popup_url
- inBrowser:controller_->browser()
- anchoredAt:arrowPoint
- arrowLocation:info_bubble::kTopRight
- devMode:devMode];
- return true;
+ ExtensionPopupController* popupController =
+ [ExtensionPopupController showURL:popup_url
+ inBrowser:controller_->browser()
+ anchoredAt:arrowPoint
+ arrowLocation:info_bubble::kTopRight
+ devMode:devMode];
+ return [popupController extensionViewHost];
}
ToolbarActionViewDelegateCocoa*

Powered by Google App Engine
This is Rietveld 408576698