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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h

Issue 670463004: Make a platform-independent ToolbarActionViewController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_CO COA_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_CO COA_H_
7
8 #include "chrome/browser/ui/extensions/extension_action_platform_delegate.h"
9
10 @class ExtensionPopupController;
11 class ToolbarActionViewDelegateCocoa;
12
13 // The cocoa-specific implementation for ExtensionActionPlatformDelegate.
14 class ExtensionActionPlatformDelegateCocoa
15 : public ExtensionActionPlatformDelegate {
16 public:
17 ExtensionActionPlatformDelegateCocoa(
18 ExtensionActionViewController* controller);
19 ~ExtensionActionPlatformDelegateCocoa() override;
20
21 private:
22 // ExtensionActionPlatformDelegate:
23 gfx::NativeView GetPopupNativeView() override;
24 bool IsMenuRunning() const override;
25 void RegisterCommand() override;
26 void OnDelegateSet() override;
27 bool IsShowingPopup() const override;
28 void CloseActivePopup() override;
29 void CloseOwnPopup() override;
30 bool ShowPopupWithUrl(
31 ExtensionActionViewController::PopupShowAction show_action,
32 const GURL& popup_url,
33 bool grant_tab_permissions) override;
34
35 // Returns the popup shown by this extension action, if one exists.
36 ExtensionPopupController* GetPopup() const;
37
38 // Returns the delegate in its cocoa implementation.
39 ToolbarActionViewDelegateCocoa* GetDelegateCocoa();
40
41 ExtensionActionViewController* controller_;
42
43 DISALLOW_COPY_AND_ASSIGN(ExtensionActionPlatformDelegateCocoa);
44 };
45
46 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE _COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698