| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_API_APP_APP_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 | 10 |
| 11 class Extension; | 11 class Extension; |
| 12 class Profile; | 12 class Profile; |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 | 15 |
| 16 class AppNotifyFunction : public SyncExtensionFunction { | 16 class AppNotifyFunction : public SyncExtensionFunction { |
| 17 public: |
| 18 DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.notify"); |
| 19 |
| 20 protected: |
| 17 virtual ~AppNotifyFunction() {} | 21 virtual ~AppNotifyFunction() {} |
| 18 virtual bool RunImpl() OVERRIDE; | 22 virtual bool RunImpl() OVERRIDE; |
| 19 DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.notify"); | |
| 20 }; | 23 }; |
| 21 | 24 |
| 22 class AppClearAllNotificationsFunction : public SyncExtensionFunction { | 25 class AppClearAllNotificationsFunction : public SyncExtensionFunction { |
| 26 public: |
| 27 DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.clearAllNotifications"); |
| 28 |
| 29 protected: |
| 23 virtual ~AppClearAllNotificationsFunction() {} | 30 virtual ~AppClearAllNotificationsFunction() {} |
| 24 virtual bool RunImpl() OVERRIDE; | 31 virtual bool RunImpl() OVERRIDE; |
| 25 DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.clearAllNotifications"); | |
| 26 }; | 32 }; |
| 27 | 33 |
| 28 class AppEventRouter { | 34 class AppEventRouter { |
| 29 public: | 35 public: |
| 30 // Dispatches the onLaunched event to the given app. | 36 // Dispatches the onLaunched event to the given app. |
| 31 static void DispatchOnLaunchedEvent(Profile* profile, | 37 static void DispatchOnLaunchedEvent(Profile* profile, |
| 32 const Extension* extension); | 38 const Extension* extension); |
| 33 }; | 39 }; |
| 34 | 40 |
| 35 } // namespace extensions | 41 } // namespace extensions |
| 36 | 42 |
| 37 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ | 43 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ |
| OLD | NEW |