OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/extensions/api/input/input.h" | 5 #include "chrome/browser/extensions/api/input/input.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "chrome/browser/extensions/extension_function_registry.h" | 10 #include "chrome/browser/extensions/extension_function_registry.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 ash::Shell::GetPrimaryRootWindow()); | 80 ash::Shell::GetPrimaryRootWindow()); |
81 #endif | 81 #endif |
82 error_ = kNotYetImplementedError; | 82 error_ = kNotYetImplementedError; |
83 return false; | 83 return false; |
84 } | 84 } |
85 | 85 |
86 bool VirtualKeyboardPrivateHideKeyboardFunction::RunImpl() { | 86 bool VirtualKeyboardPrivateHideKeyboardFunction::RunImpl() { |
87 #if defined(USE_ASH) | 87 #if defined(USE_ASH) |
88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
89 | 89 |
90 ash::Shell::GetPrimaryRootWindowController()->keyboard_controller()-> | 90 ash::Shell::GetInstance()->keyboard_controller()->HideKeyboard(); |
91 HideKeyboard(); | |
92 | 91 |
93 return true; | 92 return true; |
94 #endif | 93 #endif |
95 error_ = kNotYetImplementedError; | 94 error_ = kNotYetImplementedError; |
96 return false; | 95 return false; |
97 } | 96 } |
98 | 97 |
99 InputAPI::InputAPI(Profile* profile) { | 98 InputAPI::InputAPI(Profile* profile) { |
100 } | 99 } |
101 | 100 |
102 InputAPI::~InputAPI() { | 101 InputAPI::~InputAPI() { |
103 } | 102 } |
104 | 103 |
105 static base::LazyInstance<ProfileKeyedAPIFactory<InputAPI> > | 104 static base::LazyInstance<ProfileKeyedAPIFactory<InputAPI> > |
106 g_factory = LAZY_INSTANCE_INITIALIZER; | 105 g_factory = LAZY_INSTANCE_INITIALIZER; |
107 | 106 |
108 // static | 107 // static |
109 ProfileKeyedAPIFactory<InputAPI>* InputAPI::GetFactoryInstance() { | 108 ProfileKeyedAPIFactory<InputAPI>* InputAPI::GetFactoryInstance() { |
110 return &g_factory.Get(); | 109 return &g_factory.Get(); |
111 } | 110 } |
112 | 111 |
113 } // namespace extensions | 112 } // namespace extensions |
OLD | NEW |