Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Side by Side Diff: chrome/browser/apps/app_browsertest_util.cc

Issue 527693002: Move AppWindowContentsImpl to extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « apps/apps.gypi ('k') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/apps/app_browsertest_util.h" 5 #include "chrome/browser/apps/app_browsertest_util.h"
6 6
7 #include "apps/app_window_contents.h"
8 #include "base/command_line.h" 7 #include "base/command_line.h"
9 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_api.h" 9 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
11 #include "chrome/browser/extensions/extension_function_test_utils.h" 10 #include "chrome/browser/extensions/extension_function_test_utils.h"
12 #include "chrome/browser/extensions/extension_test_message_listener.h" 11 #include "chrome/browser/extensions/extension_test_message_listener.h"
13 #include "chrome/browser/ui/apps/chrome_app_delegate.h" 12 #include "chrome/browser/ui/apps/chrome_app_delegate.h"
14 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/extensions/application_launch.h" 14 #include "chrome/browser/ui/extensions/application_launch.h"
16 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
17 #include "content/public/test/browser_test_utils.h" 16 #include "content/public/test/browser_test_utils.h"
18 #include "content/public/test/test_utils.h" 17 #include "content/public/test/test_utils.h"
18 #include "extensions/browser/app_window/app_window_contents.h"
19 #include "extensions/browser/app_window/app_window_registry.h" 19 #include "extensions/browser/app_window/app_window_registry.h"
20 #include "extensions/browser/app_window/native_app_window.h" 20 #include "extensions/browser/app_window/native_app_window.h"
21 #include "extensions/common/switches.h" 21 #include "extensions/common/switches.h"
22 22
23 using content::WebContents; 23 using content::WebContents;
24 24
25 namespace { 25 namespace {
26 26
27 const char kAppWindowTestApp[] = "app_window/generic"; 27 const char kAppWindowTestApp[] = "app_window/generic";
28 28
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 AppWindow* PlatformAppBrowserTest::CreateAppWindow(const Extension* extension) { 195 AppWindow* PlatformAppBrowserTest::CreateAppWindow(const Extension* extension) {
196 return CreateAppWindowFromParams(extension, AppWindow::CreateParams()); 196 return CreateAppWindowFromParams(extension, AppWindow::CreateParams());
197 } 197 }
198 198
199 AppWindow* PlatformAppBrowserTest::CreateAppWindowFromParams( 199 AppWindow* PlatformAppBrowserTest::CreateAppWindowFromParams(
200 const Extension* extension, 200 const Extension* extension,
201 const AppWindow::CreateParams& params) { 201 const AppWindow::CreateParams& params) {
202 AppWindow* window = 202 AppWindow* window =
203 new AppWindow(browser()->profile(), new ChromeAppDelegate(), extension); 203 new AppWindow(browser()->profile(), new ChromeAppDelegate(), extension);
204 window->Init( 204 window->Init(GURL(std::string()), new AppWindowContentsImpl(window), params);
205 GURL(std::string()), new apps::AppWindowContentsImpl(window), params);
206 return window; 205 return window;
207 } 206 }
208 207
209 void PlatformAppBrowserTest::CloseAppWindow(AppWindow* window) { 208 void PlatformAppBrowserTest::CloseAppWindow(AppWindow* window) {
210 content::WebContentsDestroyedWatcher destroyed_watcher( 209 content::WebContentsDestroyedWatcher destroyed_watcher(
211 window->web_contents()); 210 window->web_contents());
212 window->GetBaseWindow()->Close(); 211 window->GetBaseWindow()->Close();
213 destroyed_watcher.Wait(); 212 destroyed_watcher.Wait();
214 } 213 }
215 214
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return app_window; 248 return app_window;
250 } 249 }
251 250
252 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( 251 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine(
253 CommandLine* command_line) { 252 CommandLine* command_line) {
254 PlatformAppBrowserTest::SetUpCommandLine(command_line); 253 PlatformAppBrowserTest::SetUpCommandLine(command_line);
255 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); 254 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
256 } 255 }
257 256
258 } // namespace extensions 257 } // namespace extensions
OLDNEW
« no previous file with comments | « apps/apps.gypi ('k') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698