| 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" |
| 11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
| 12 | 12 |
| 13 @class ExtensionPopupController; | 13 @class ExtensionPopupController; |
| 14 class ToolbarActionViewDelegateCocoa; | 14 class ToolbarActionViewDelegateCocoa; |
| 15 | 15 |
| 16 // The cocoa-specific implementation for ExtensionActionPlatformDelegate. | 16 // The Cocoa-specific implementation for ExtensionActionPlatformDelegate. |
| 17 class ExtensionActionPlatformDelegateCocoa | 17 class ExtensionActionPlatformDelegateCocoa |
| 18 : public ExtensionActionPlatformDelegate, | 18 : public ExtensionActionPlatformDelegate, |
| 19 public content::NotificationObserver { | 19 public content::NotificationObserver { |
| 20 public: | 20 public: |
| 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: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 bool grant_tab_permissions) override; | 37 bool grant_tab_permissions) override; |
| 38 | 38 |
| 39 // content::NotificationObserver: | 39 // content::NotificationObserver: |
| 40 void Observe(int type, | 40 void Observe(int type, |
| 41 const content::NotificationSource& source, | 41 const content::NotificationSource& source, |
| 42 const content::NotificationDetails& details) override; | 42 const content::NotificationDetails& details) override; |
| 43 | 43 |
| 44 // Returns the popup shown by this extension action, if one exists. | 44 // Returns the popup shown by this extension action, if one exists. |
| 45 ExtensionPopupController* GetPopup() const; | 45 ExtensionPopupController* GetPopup() const; |
| 46 | 46 |
| 47 // Returns the delegate in its cocoa implementation. | 47 // Returns the delegate in its Cocoa implementation. |
| 48 ToolbarActionViewDelegateCocoa* GetDelegateCocoa(); | 48 ToolbarActionViewDelegateCocoa* GetDelegateCocoa(); |
| 49 | 49 |
| 50 // The main controller for this extension action. | 50 // The main controller for this extension action. |
| 51 ExtensionActionViewController* controller_; | 51 ExtensionActionViewController* controller_; |
| 52 | 52 |
| 53 content::NotificationRegistrar registrar_; | 53 content::NotificationRegistrar registrar_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(ExtensionActionPlatformDelegateCocoa); | 55 DISALLOW_COPY_AND_ASSIGN(ExtensionActionPlatformDelegateCocoa); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE
_COCOA_H_ | 58 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE
_COCOA_H_ |
| OLD | NEW |