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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(gfx::kNullAcceleratedWidget); | 70 chrome::OpenAsh(gfx::kNullAcceleratedWidget); |
| 71 |
| 72 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 73 ash::Shell::GetInstance()->CreateShelf(); |
| 74 ash::Shell::GetInstance()->ShowShelf(); |
| 75 #endif |
71 } else { | 76 } else { |
72 #if !defined(OS_CHROMEOS) | 77 #if !defined(OS_CHROMEOS) |
73 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); | 78 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin); |
74 ui::SelectFileDialog::SetShellDialogsDelegate( | 79 ui::SelectFileDialog::SetShellDialogsDelegate( |
75 g_shell_dialogs_delegate.Pointer()); | 80 g_shell_dialogs_delegate.Pointer()); |
76 #endif | 81 #endif |
77 } | 82 } |
78 #if defined(OS_CHROMEOS) | 83 #if defined(OS_CHROMEOS) |
79 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile | 84 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile |
80 // initialized. Otherwise, virtual keyboard extension will not load at login | 85 // 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. | 103 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc. |
99 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { | 104 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { |
100 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 105 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
101 keyboard::KeyboardController::GetInstance()); | 106 keyboard::KeyboardController::GetInstance()); |
102 } | 107 } |
103 } | 108 } |
104 | 109 |
105 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 110 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
106 chrome::CloseAsh(); | 111 chrome::CloseAsh(); |
107 } | 112 } |
OLD | NEW |