OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 CreateParams params(type, profile); | 458 CreateParams params(type, profile); |
459 params.app_name = app_name; | 459 params.app_name = app_name; |
460 if (!window_bounds.IsEmpty()) | 460 if (!window_bounds.IsEmpty()) |
461 params.initial_bounds = window_bounds; | 461 params.initial_bounds = window_bounds; |
462 | 462 |
463 return CreateWithParams(params); | 463 return CreateWithParams(params); |
464 } | 464 } |
465 | 465 |
466 // static | 466 // static |
467 Browser* Browser::CreateForDevTools(Profile* profile) { | 467 Browser* Browser::CreateForDevTools(Profile* profile) { |
| 468 #if defined(OS_CHROMEOS) |
| 469 CreateParams params(TYPE_TABBED, profile); |
| 470 #else |
468 CreateParams params(TYPE_POPUP, profile); | 471 CreateParams params(TYPE_POPUP, profile); |
| 472 #endif |
469 params.app_name = DevToolsWindow::kDevToolsApp; | 473 params.app_name = DevToolsWindow::kDevToolsApp; |
470 return CreateWithParams(params); | 474 return CreateWithParams(params); |
471 } | 475 } |
472 | 476 |
473 void Browser::InitBrowserWindow() { | 477 void Browser::InitBrowserWindow() { |
474 DCHECK(!window_); | 478 DCHECK(!window_); |
475 | 479 |
476 window_ = CreateBrowserWindow(); | 480 window_ = CreateBrowserWindow(); |
477 | 481 |
478 #if defined(OS_WIN) | 482 #if defined(OS_WIN) |
(...skipping 4624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5103 } | 5107 } |
5104 | 5108 |
5105 void Browser::ShowSyncSetup() { | 5109 void Browser::ShowSyncSetup() { |
5106 ProfileSyncService* service = | 5110 ProfileSyncService* service = |
5107 profile()->GetOriginalProfile()->GetProfileSyncService(); | 5111 profile()->GetOriginalProfile()->GetProfileSyncService(); |
5108 if (service->HasSyncSetupCompleted()) | 5112 if (service->HasSyncSetupCompleted()) |
5109 ShowOptionsTab(chrome::kSyncSetupSubPage); | 5113 ShowOptionsTab(chrome::kSyncSetupSubPage); |
5110 else | 5114 else |
5111 service->ShowLoginDialog(); | 5115 service->ShowLoginDialog(); |
5112 } | 5116 } |
OLD | NEW |