OLD | NEW |
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/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" | 5 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/chrome_browser_main.h" | 8 #include "chrome/browser/chrome_browser_main.h" |
9 #include "chrome/browser/toolkit_extra_parts.h" | 9 #include "chrome/browser/toolkit_extra_parts.h" |
10 #include "chrome/browser/ui/ash/ash_init.h" | 10 #include "chrome/browser/ui/ash/ash_init.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() { | 40 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() { |
41 } | 41 } |
42 | 42 |
43 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() { | 43 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() { |
44 } | 44 } |
45 | 45 |
46 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { | 46 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { |
47 if (chrome::ShouldOpenAshOnStartup()) { | 47 if (chrome::ShouldOpenAshOnStartup()) { |
48 chrome::OpenAsh(); | 48 chrome::OpenAsh(); |
49 if (CommandLine::ForCurrentProcess()->HasSwitch( | 49 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
50 switches::kAshEnableTabScrubbing)) { | 50 switches::kAshDisableTabScrubbing)) { |
51 TabScrubber::GetInstance(); | 51 TabScrubber::GetInstance(); |
52 } | 52 } |
53 } else { | 53 } else { |
54 #if !defined(OS_CHROMEOS) | 54 #if !defined(OS_CHROMEOS) |
55 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); | 55 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); |
56 #endif | 56 #endif |
57 } | 57 } |
58 | 58 |
59 #if defined(FILE_MANAGER_EXTENSION) | 59 #if defined(FILE_MANAGER_EXTENSION) |
60 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); | 60 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); |
61 #endif | 61 #endif |
62 } | 62 } |
63 | 63 |
64 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { | 64 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { |
65 } | 65 } |
66 | 66 |
67 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 67 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
68 chrome::CloseAsh(); | 68 chrome::CloseAsh(); |
69 } | 69 } |
70 | 70 |
71 namespace chrome { | 71 namespace chrome { |
72 | 72 |
73 void AddAshToolkitExtraParts(ChromeBrowserMainParts* main_parts) { | 73 void AddAshToolkitExtraParts(ChromeBrowserMainParts* main_parts) { |
74 main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh()); | 74 main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh()); |
75 } | 75 } |
76 | 76 |
77 } // namespace chrome | 77 } // namespace chrome |
OLD | NEW |