Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: ash/content/shell_content_state.cc

Issue 1392713002: Extract content dependency from keyboard code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/ash.gyp ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ash/content/shell_content_state.h" 5 #include "ash/content/shell_content_state.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/keyboard/content/keyboard.h"
8 9
9 namespace ash { 10 namespace ash {
10 11
11 // static 12 // static
12 ShellContentState* ShellContentState::instance_ = nullptr; 13 ShellContentState* ShellContentState::instance_ = nullptr;
13 14
14 // static 15 // static
15 void ShellContentState::SetInstance(ShellContentState* instance) { 16 void ShellContentState::SetInstance(ShellContentState* instance) {
16 DCHECK(!instance_); 17 DCHECK(!instance_);
17 instance_ = instance; 18 instance_ = instance;
18 } 19 }
19 20
20 // static 21 // static
21 ShellContentState* ShellContentState::GetInstance() { 22 ShellContentState* ShellContentState::GetInstance() {
22 DCHECK(instance_); 23 DCHECK(instance_);
23 return instance_; 24 return instance_;
24 } 25 }
25 26
26 // static 27 // static
27 void ShellContentState::DestroyInstance() { 28 void ShellContentState::DestroyInstance() {
28 DCHECK(instance_); 29 DCHECK(instance_);
29 delete instance_; 30 delete instance_;
30 instance_ = nullptr; 31 instance_ = nullptr;
31 } 32 }
32 33
33 ShellContentState::ShellContentState() {} 34 ShellContentState::ShellContentState() {
35 // The keyboard system must be initialized before the RootWindowController is
36 // created.
37 #if defined(OS_CHROMEOS)
38 keyboard::InitializeKeyboard();
39 #endif
40 }
34 ShellContentState::~ShellContentState() {} 41 ShellContentState::~ShellContentState() {}
35 42
36 } // namespace ash 43 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698