| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_CO
COA_H_ | 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_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_CO
COA_H_ |
| 7 | 7 |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "chrome/browser/ui/extensions/extension_action_platform_delegate.h" | 9 #include "chrome/browser/ui/extensions/extension_action_platform_delegate.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 ExtensionActionPlatformDelegateCocoa( | 21 ExtensionActionPlatformDelegateCocoa( |
| 22 ExtensionActionViewController* controller); | 22 ExtensionActionViewController* controller); |
| 23 ~ExtensionActionPlatformDelegateCocoa() override; | 23 ~ExtensionActionPlatformDelegateCocoa() override; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 // ExtensionActionPlatformDelegate: | 26 // ExtensionActionPlatformDelegate: |
| 27 gfx::NativeView GetPopupNativeView() override; | 27 gfx::NativeView GetPopupNativeView() override; |
| 28 bool IsMenuRunning() const override; | 28 bool IsMenuRunning() const override; |
| 29 void RegisterCommand() override; | 29 void RegisterCommand() override; |
| 30 void OnDelegateSet() override; | 30 void OnDelegateSet() override; |
| 31 bool IsShowingPopup() const override; | |
| 32 void CloseActivePopup() override; | 31 void CloseActivePopup() override; |
| 33 void CloseOwnPopup() override; | 32 void CloseOwnPopup() override; |
| 34 bool ShowPopupWithUrl( | 33 extensions::ExtensionViewHost* ShowPopupWithUrl( |
| 35 ExtensionActionViewController::PopupShowAction show_action, | 34 ExtensionActionViewController::PopupShowAction show_action, |
| 36 const GURL& popup_url, | 35 const GURL& popup_url, |
| 37 bool grant_tab_permissions) override; | 36 bool grant_tab_permissions) override; |
| 38 | 37 |
| 39 // content::NotificationObserver: | 38 // content::NotificationObserver: |
| 40 void Observe(int type, | 39 void Observe(int type, |
| 41 const content::NotificationSource& source, | 40 const content::NotificationSource& source, |
| 42 const content::NotificationDetails& details) override; | 41 const content::NotificationDetails& details) override; |
| 43 | 42 |
| 44 // Returns the popup shown by this extension action, if one exists. | 43 // Returns the popup shown by this extension action, if one exists. |
| 45 ExtensionPopupController* GetPopup() const; | 44 ExtensionPopupController* GetPopup() const; |
| 46 | 45 |
| 47 // Returns the delegate in its cocoa implementation. | 46 // Returns the delegate in its cocoa implementation. |
| 48 ToolbarActionViewDelegateCocoa* GetDelegateCocoa(); | 47 ToolbarActionViewDelegateCocoa* GetDelegateCocoa(); |
| 49 | 48 |
| 50 // The main controller for this extension action. | 49 // The main controller for this extension action. |
| 51 ExtensionActionViewController* controller_; | 50 ExtensionActionViewController* controller_; |
| 52 | 51 |
| 53 content::NotificationRegistrar registrar_; | 52 content::NotificationRegistrar registrar_; |
| 54 | 53 |
| 55 DISALLOW_COPY_AND_ASSIGN(ExtensionActionPlatformDelegateCocoa); | 54 DISALLOW_COPY_AND_ASSIGN(ExtensionActionPlatformDelegateCocoa); |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE
_COCOA_H_ | 57 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE
_COCOA_H_ |
| OLD | NEW |