| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_APP_CURRENT_WINDOW_API_
H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_APP_CURRENT_WINDOW_API_
H_ |
| 7 |
| 8 #include "chrome/browser/extensions/extension_function.h" |
| 9 |
| 10 class ShellWindow; |
| 11 |
| 12 namespace extensions { |
| 13 |
| 14 class AppCurrentWindowExtensionFunction : public SyncExtensionFunction { |
| 15 protected: |
| 16 virtual ~AppCurrentWindowExtensionFunction() {} |
| 17 |
| 18 // Invoked with the current shell window. |
| 19 virtual bool RunWithWindow(ShellWindow* window) = 0; |
| 20 |
| 21 private: |
| 22 virtual bool RunImpl() OVERRIDE; |
| 23 }; |
| 24 |
| 25 class AppCurrentWindowFocusFunction |
| 26 : public AppCurrentWindowExtensionFunction { |
| 27 public: |
| 28 DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindow.focus"); |
| 29 |
| 30 protected: |
| 31 virtual ~AppCurrentWindowFocusFunction() {} |
| 32 virtual bool RunWithWindow(ShellWindow* window) OVERRIDE; |
| 33 }; |
| 34 |
| 35 class AppCurrentWindowMaximizeFunction |
| 36 : public AppCurrentWindowExtensionFunction { |
| 37 public: |
| 38 DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindow.maximize"); |
| 39 |
| 40 protected: |
| 41 virtual ~AppCurrentWindowMaximizeFunction() {} |
| 42 virtual bool RunWithWindow(ShellWindow* window) OVERRIDE; |
| 43 }; |
| 44 |
| 45 class AppCurrentWindowMinimizeFunction |
| 46 : public AppCurrentWindowExtensionFunction { |
| 47 public: |
| 48 DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindow.minimize"); |
| 49 |
| 50 protected: |
| 51 virtual ~AppCurrentWindowMinimizeFunction() {} |
| 52 virtual bool RunWithWindow(ShellWindow* window) OVERRIDE; |
| 53 }; |
| 54 |
| 55 class AppCurrentWindowRestoreFunction |
| 56 : public AppCurrentWindowExtensionFunction { |
| 57 public: |
| 58 DECLARE_EXTENSION_FUNCTION_NAME("app.currentWindow.restore"); |
| 59 |
| 60 protected: |
| 61 virtual ~AppCurrentWindowRestoreFunction() {} |
| 62 virtual bool RunWithWindow(ShellWindow* window) OVERRIDE; |
| 63 }; |
| 64 |
| 65 } // namespace extensions |
| 66 |
| 67 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_APP_CURRENT_WINDOW_A
PI_H_ |
| OLD | NEW |