summaryrefslogtreecommitdiffstats
path: root/chrome/browser/apps/app_browsertest_util.cc
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-15 05:36:33 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-15 05:36:33 +0000
commitdbb03fbe591bdf4e711af10c3e8233e68b29ee49 (patch)
tree0958d99e8988d6bfd7aefe6bf024b425fbef46af /chrome/browser/apps/app_browsertest_util.cc
parent26f8f3aa15d34fd29080889512131b02d933fef5 (diff)
downloadchromium_src-dbb03fbe591bdf4e711af10c3e8233e68b29ee49.zip
chromium_src-dbb03fbe591bdf4e711af10c3e8233e68b29ee49.tar.gz
chromium_src-dbb03fbe591bdf4e711af10c3e8233e68b29ee49.tar.bz2
Rename apps::ShellWindow to apps::AppWindow
* Rename ShellWindowRegistry * Rename ShellWindowGeometryCache * Rename members like shell_window_ to app_window_ * Rename locals like shell_window to app_window BUG=343591 TEST=compiles COLLABORATOR=scheib@chromium.org TBR=skuhne@chromium.org for chrome/browser/ui/ash/launcher TBR=thakis@chromium.org for chrome/browser/ui/cocoa TBR=erg@chromium.org for chrome/browser/ui/gtk TBR=sky@chromium.org for chrome/test Review URL: https://codereview.chromium.org/166573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251542 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/apps/app_browsertest_util.cc')
-rw-r--r--chrome/browser/apps/app_browsertest_util.cc79
1 files changed, 38 insertions, 41 deletions
diff --git a/chrome/browser/apps/app_browsertest_util.cc b/chrome/browser/apps/app_browsertest_util.cc
index e2fa045..69479e1 100644
--- a/chrome/browser/apps/app_browsertest_util.cc
+++ b/chrome/browser/apps/app_browsertest_util.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/apps/app_browsertest_util.h"
#include "apps/app_window_contents.h"
-#include "apps/shell_window_registry.h"
+#include "apps/app_window_registry.h"
#include "apps/ui/native_app_window.h"
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
@@ -19,8 +19,8 @@
#include "content/public/test/test_utils.h"
#include "extensions/common/switches.h"
-using apps::ShellWindow;
-using apps::ShellWindowRegistry;
+using apps::AppWindow;
+using apps::AppWindowRegistry;
using content::WebContents;
namespace utils = extension_function_test_utils;
@@ -41,15 +41,14 @@ void PlatformAppBrowserTest::SetUpCommandLine(CommandLine* command_line) {
}
// static
-ShellWindow* PlatformAppBrowserTest::GetFirstShellWindowForBrowser(
+AppWindow* PlatformAppBrowserTest::GetFirstAppWindowForBrowser(
Browser* browser) {
- ShellWindowRegistry* app_registry =
- ShellWindowRegistry::Get(browser->profile());
- const ShellWindowRegistry::ShellWindowList& shell_windows =
- app_registry->shell_windows();
+ AppWindowRegistry* app_registry = AppWindowRegistry::Get(browser->profile());
+ const AppWindowRegistry::AppWindowList& app_windows =
+ app_registry->app_windows();
- ShellWindowRegistry::const_iterator iter = shell_windows.begin();
- if (iter != shell_windows.end())
+ AppWindowRegistry::const_iterator iter = app_windows.begin();
+ if (iter != app_windows.end())
return *iter;
return NULL;
@@ -101,27 +100,27 @@ void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) {
browser()->profile(), extension, LAUNCH_CONTAINER_NONE, NEW_WINDOW));
}
-WebContents* PlatformAppBrowserTest::GetFirstShellWindowWebContents() {
- ShellWindow* window = GetFirstShellWindow();
+WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() {
+ AppWindow* window = GetFirstAppWindow();
if (window)
return window->web_contents();
return NULL;
}
-ShellWindow* PlatformAppBrowserTest::GetFirstShellWindow() {
- return GetFirstShellWindowForBrowser(browser());
+AppWindow* PlatformAppBrowserTest::GetFirstAppWindow() {
+ return GetFirstAppWindowForBrowser(browser());
}
-apps::ShellWindow* PlatformAppBrowserTest::GetFirstShellWindowForApp(
+apps::AppWindow* PlatformAppBrowserTest::GetFirstAppWindowForApp(
const std::string& app_id) {
- ShellWindowRegistry* app_registry =
- ShellWindowRegistry::Get(browser()->profile());
- const ShellWindowRegistry::ShellWindowList& shell_windows =
- app_registry->GetShellWindowsForApp(app_id);
+ AppWindowRegistry* app_registry =
+ AppWindowRegistry::Get(browser()->profile());
+ const AppWindowRegistry::AppWindowList& app_windows =
+ app_registry->GetAppWindowsForApp(app_id);
- ShellWindowRegistry::const_iterator iter = shell_windows.begin();
- if (iter != shell_windows.end())
+ AppWindowRegistry::const_iterator iter = app_windows.begin();
+ if (iter != app_windows.end())
return *iter;
return NULL;
@@ -151,15 +150,15 @@ bool PlatformAppBrowserTest::RunGetWindowFunctionForExtension(
return function->GetResultList() != NULL;
}
-size_t PlatformAppBrowserTest::GetShellWindowCount() {
- return ShellWindowRegistry::Get(browser()->profile())->
- shell_windows().size();
+size_t PlatformAppBrowserTest::GetAppWindowCount() {
+ return AppWindowRegistry::Get(browser()->profile())->app_windows().size();
}
-size_t PlatformAppBrowserTest::GetShellWindowCountForApp(
+size_t PlatformAppBrowserTest::GetAppWindowCountForApp(
const std::string& app_id) {
- return ShellWindowRegistry::Get(browser()->profile())->
- GetShellWindowsForApp(app_id).size();
+ return AppWindowRegistry::Get(browser()->profile())
+ ->GetAppWindowsForApp(app_id)
+ .size();
}
void PlatformAppBrowserTest::ClearCommandLineArgs() {
@@ -179,31 +178,29 @@ void PlatformAppBrowserTest::SetCommandLineArg(const std::string& test_file) {
command_line->AppendArgPath(test_doc);
}
-ShellWindow* PlatformAppBrowserTest::CreateShellWindow(
- const Extension* extension) {
- return CreateShellWindowFromParams(extension, ShellWindow::CreateParams());
+AppWindow* PlatformAppBrowserTest::CreateAppWindow(const Extension* extension) {
+ return CreateAppWindowFromParams(extension, AppWindow::CreateParams());
}
-ShellWindow* PlatformAppBrowserTest::CreateShellWindowFromParams(
- const Extension* extension, const ShellWindow::CreateParams& params) {
- ShellWindow* window = new ShellWindow(browser()->profile(),
- new ChromeShellWindowDelegate(),
- extension);
- window->Init(GURL(std::string()),
- new apps::AppWindowContents(window),
- params);
+AppWindow* PlatformAppBrowserTest::CreateAppWindowFromParams(
+ const Extension* extension,
+ const AppWindow::CreateParams& params) {
+ AppWindow* window = new AppWindow(
+ browser()->profile(), new ChromeShellWindowDelegate(), extension);
+ window->Init(
+ GURL(std::string()), new apps::AppWindowContentsImpl(window), params);
return window;
}
-void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) {
+void PlatformAppBrowserTest::CloseAppWindow(AppWindow* window) {
content::WebContentsDestroyedWatcher destroyed_watcher(
window->web_contents());
window->GetBaseWindow()->Close();
destroyed_watcher.Wait();
}
-void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForShellWindow(
- ShellWindow* window,
+void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForAppWindow(
+ AppWindow* window,
const gfx::Rect& cached_bounds,
const gfx::Rect& cached_screen_bounds,
const gfx::Rect& current_screen_bounds,