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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/extensions/api/tabs/tabs_api.h" 9 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
10 #include "chrome/browser/extensions/extension_function_test_utils.h" 10 #include "chrome/browser/extensions/extension_function_test_utils.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const Extension* extension = InstallPlatformApp(name); 114 const Extension* extension = InstallPlatformApp(name);
115 115
116 LaunchPlatformApp(extension); 116 LaunchPlatformApp(extension);
117 117
118 app_loaded_observer.Wait(); 118 app_loaded_observer.Wait();
119 119
120 return extension; 120 return extension;
121 } 121 }
122 122
123 void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) { 123 void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) {
124 OpenApplication(AppLaunchParams(browser()->profile(), extension, 124 OpenApplication(AppLaunchParams(
125 LAUNCH_CONTAINER_NONE, NEW_WINDOW, 125 browser()->profile(), extension, LAUNCH_CONTAINER_NONE,
126 extensions::SOURCE_TEST)); 126 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_TEST));
127 } 127 }
128 128
129 void PlatformAppBrowserTest::LaunchHostedApp(const Extension* extension) { 129 void PlatformAppBrowserTest::LaunchHostedApp(const Extension* extension) {
130 OpenApplication(CreateAppLaunchParamsUserContainer( 130 OpenApplication(CreateAppLaunchParamsUserContainer(
131 browser()->profile(), extension, NEW_FOREGROUND_TAB, 131 browser()->profile(), extension,
132 WindowOpenDisposition::NEW_FOREGROUND_TAB,
132 extensions::SOURCE_COMMAND_LINE)); 133 extensions::SOURCE_COMMAND_LINE));
133 } 134 }
134 135
135 WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() { 136 WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() {
136 AppWindow* window = GetFirstAppWindow(); 137 AppWindow* window = GetFirstAppWindow();
137 if (window) 138 if (window)
138 return window->web_contents(); 139 return window->web_contents();
139 140
140 return NULL; 141 return NULL;
141 } 142 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 return app_window; 257 return app_window;
257 } 258 }
258 259
259 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( 260 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine(
260 base::CommandLine* command_line) { 261 base::CommandLine* command_line) {
261 PlatformAppBrowserTest::SetUpCommandLine(command_line); 262 PlatformAppBrowserTest::SetUpCommandLine(command_line);
262 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); 263 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
263 } 264 }
264 265
265 } // namespace extensions 266 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/app_shim/extension_app_shim_handler_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698