| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_APPS_APP_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 6 #define CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/browser/extensions/extension_apitest.h" | 11 #include "chrome/browser/extensions/extension_apitest.h" |
| 12 #include "extensions/browser/app_window/app_window.h" | 12 #include "extensions/browser/app_window/app_window.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class CommandLine; | 15 class CommandLine; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class BrowserContext; |
| 19 class WebContents; | 20 class WebContents; |
| 20 } | 21 } |
| 21 | 22 |
| 22 class Browser; | 23 class Browser; |
| 23 class ExtensionTestMessageListener; | 24 class ExtensionTestMessageListener; |
| 24 | 25 |
| 25 namespace extensions { | 26 namespace extensions { |
| 26 class Extension; | 27 class Extension; |
| 27 | 28 |
| 28 class PlatformAppBrowserTest : public ExtensionApiTest { | 29 class PlatformAppBrowserTest : public ExtensionApiTest { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 bool RunGetWindowFunctionForExtension(int window_id, | 84 bool RunGetWindowFunctionForExtension(int window_id, |
| 84 const Extension* extension); | 85 const Extension* extension); |
| 85 | 86 |
| 86 // Returns the number of app windows. | 87 // Returns the number of app windows. |
| 87 size_t GetAppWindowCount(); | 88 size_t GetAppWindowCount(); |
| 88 | 89 |
| 89 // Returns the number of app windows for a specific app. | 90 // Returns the number of app windows for a specific app. |
| 90 size_t GetAppWindowCountForApp(const std::string& app_id); | 91 size_t GetAppWindowCountForApp(const std::string& app_id); |
| 91 | 92 |
| 92 // Creates an empty app window for |extension|. | 93 // Creates an empty app window for |extension|. |
| 93 AppWindow* CreateAppWindow(const Extension* extension); | 94 AppWindow* CreateAppWindow(content::BrowserContext* context, |
| 95 const Extension* extension); |
| 94 | 96 |
| 95 AppWindow* CreateAppWindowFromParams(const Extension* extension, | 97 AppWindow* CreateAppWindowFromParams(content::BrowserContext* context, |
| 98 const Extension* extension, |
| 96 const AppWindow::CreateParams& params); | 99 const AppWindow::CreateParams& params); |
| 97 | 100 |
| 98 // Closes |window| and waits until it's gone. | 101 // Closes |window| and waits until it's gone. |
| 99 void CloseAppWindow(AppWindow* window); | 102 void CloseAppWindow(AppWindow* window); |
| 100 | 103 |
| 101 // Call AdjustBoundsToBeVisibleOnScreen of |window|. | 104 // Call AdjustBoundsToBeVisibleOnScreen of |window|. |
| 102 void CallAdjustBoundsToBeVisibleOnScreenForAppWindow( | 105 void CallAdjustBoundsToBeVisibleOnScreenForAppWindow( |
| 103 AppWindow* window, | 106 AppWindow* window, |
| 104 const gfx::Rect& cached_bounds, | 107 const gfx::Rect& cached_bounds, |
| 105 const gfx::Rect& cached_screen_bounds, | 108 const gfx::Rect& cached_screen_bounds, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 118 }; | 121 }; |
| 119 | 122 |
| 120 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { | 123 class ExperimentalPlatformAppBrowserTest : public PlatformAppBrowserTest { |
| 121 public: | 124 public: |
| 122 void SetUpCommandLine(base::CommandLine* command_line) override; | 125 void SetUpCommandLine(base::CommandLine* command_line) override; |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 } // namespace extensions | 128 } // namespace extensions |
| 126 | 129 |
| 127 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ | 130 #endif // CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ |
| OLD | NEW |