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 "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #endif | 60 #endif |
61 | 61 |
62 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() { | 62 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() { |
63 } | 63 } |
64 | 64 |
65 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() { | 65 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() { |
66 } | 66 } |
67 | 67 |
68 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { | 68 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { |
69 if (chrome::ShouldOpenAshOnStartup()) { | 69 if (chrome::ShouldOpenAshOnStartup()) { |
70 chrome::OpenAsh(); | 70 chrome::OpenAsh(gfx::kNullAcceleratedWidget); |
71 } else { | 71 } else { |
72 #if !defined(OS_CHROMEOS) | 72 #if !defined(OS_CHROMEOS) |
73 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); | 73 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); |
74 ui::SelectFileDialog::SetShellDialogsDelegate( | 74 ui::SelectFileDialog::SetShellDialogsDelegate( |
75 g_shell_dialogs_delegate.Pointer()); | 75 g_shell_dialogs_delegate.Pointer()); |
76 #endif | 76 #endif |
77 } | 77 } |
78 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
79 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile | 79 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile |
80 // initialized. Otherwise, virtual keyboard extension will not load at login | 80 // initialized. Otherwise, virtual keyboard extension will not load at login |
(...skipping 17 matching lines...) Expand all Loading... |
98 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc. | 98 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc. |
99 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { | 99 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { |
100 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 100 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
101 keyboard::KeyboardController::GetInstance()); | 101 keyboard::KeyboardController::GetInstance()); |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 105 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
106 chrome::CloseAsh(); | 106 chrome::CloseAsh(); |
107 } | 107 } |
OLD | NEW |