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

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 187443008: Elim Browser::AppType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add non trusted type test Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/profiles/profile_destroyer.h" 8 #include "chrome/browser/profiles/profile_destroyer.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return new TestBrowserWindow(); 219 return new TestBrowserWindow();
220 } 220 }
221 221
222 Browser* BrowserWithTestWindowTest::CreateBrowser( 222 Browser* BrowserWithTestWindowTest::CreateBrowser(
223 Profile* profile, 223 Profile* profile,
224 Browser::Type browser_type, 224 Browser::Type browser_type,
225 bool hosted_app, 225 bool hosted_app,
226 chrome::HostDesktopType host_desktop_type, 226 chrome::HostDesktopType host_desktop_type,
227 BrowserWindow* browser_window) { 227 BrowserWindow* browser_window) {
228 Browser::CreateParams params(profile, host_desktop_type); 228 Browser::CreateParams params(profile, host_desktop_type);
229 params.type = browser_type; 229 if (hosted_app) {
230 params = Browser::CreateParams::CreateForApp(Browser::TYPE_TRUSTED_POPUP,
231 "Test",
232 gfx::Rect(),
233 profile,
234 host_desktop_type);
235 } else {
236 params.type = browser_type;
237 }
230 params.window = browser_window; 238 params.window = browser_window;
231 if (hosted_app)
232 params.app_name = "Test";
233 return new Browser(params); 239 return new Browser(params);
234 } 240 }
235 241
236 #if defined(TOOLKIT_VIEWS) 242 #if defined(TOOLKIT_VIEWS)
237 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() { 243 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
238 return new views::TestViewsDelegate; 244 return new views::TestViewsDelegate;
239 } 245 }
240 #endif 246 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698