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_state_delegate.h" | 8 #include "ash/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); |
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.Get()); | 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 |
81 // screen. | 81 // screen. |
82 if (keyboard::IsKeyboardEnabled()) | 82 if (keyboard::IsKeyboardEnabled()) |
83 keyboard::InitializeKeyboard(); | 83 keyboard::InitializeKeyboard(); |
84 #endif | 84 #endif |
85 | 85 |
(...skipping 13 matching lines...) Expand all Loading... |
99 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc. | 99 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc. |
100 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { | 100 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { |
101 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 101 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
102 ash::Shell::GetInstance()->keyboard_controller()); | 102 ash::Shell::GetInstance()->keyboard_controller()); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 106 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
107 chrome::CloseAsh(); | 107 chrome::CloseAsh(); |
108 } | 108 } |
OLD | NEW |