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

Side by Side Diff: chrome/browser/chromeos/extensions/input_method_api.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
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/chromeos/extensions/input_method_api.h" 5 #include "chrome/browser/chromeos/extensions/input_method_api.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" 10 #include "chrome/browser/chromeos/extensions/input_method_event_router.h"
(...skipping 16 matching lines...) Expand all
27 27
28 namespace extensions { 28 namespace extensions {
29 29
30 ExtensionFunction::ResponseAction GetInputMethodConfigFunction::Run() { 30 ExtensionFunction::ResponseAction GetInputMethodConfigFunction::Run() {
31 #if !defined(OS_CHROMEOS) 31 #if !defined(OS_CHROMEOS)
32 EXTENSION_FUNCTION_VALIDATE(false); 32 EXTENSION_FUNCTION_VALIDATE(false);
33 #else 33 #else
34 base::DictionaryValue* output = new base::DictionaryValue(); 34 base::DictionaryValue* output = new base::DictionaryValue();
35 output->SetBoolean( 35 output->SetBoolean(
36 "isPhysicalKeyboardAutocorrectEnabled", 36 "isPhysicalKeyboardAutocorrectEnabled",
37 CommandLine::ForCurrentProcess()->HasSwitch( 37 base::CommandLine::ForCurrentProcess()->HasSwitch(
38 chromeos::switches::kEnablePhysicalKeyboardAutocorrect)); 38 chromeos::switches::kEnablePhysicalKeyboardAutocorrect));
39 output->SetBoolean( 39 output->SetBoolean("isNewQPInputViewEnabled",
40 "isNewQPInputViewEnabled", 40 base::CommandLine::ForCurrentProcess()->HasSwitch(
41 CommandLine::ForCurrentProcess()->HasSwitch( 41 chromeos::switches::kEnableNewQPInputView));
42 chromeos::switches::kEnableNewQPInputView));
43 return RespondNow(OneArgument(output)); 42 return RespondNow(OneArgument(output));
44 #endif 43 #endif
45 } 44 }
46 45
47 ExtensionFunction::ResponseAction GetCurrentInputMethodFunction::Run() { 46 ExtensionFunction::ResponseAction GetCurrentInputMethodFunction::Run() {
48 #if !defined(OS_CHROMEOS) 47 #if !defined(OS_CHROMEOS)
49 EXTENSION_FUNCTION_VALIDATE(false); 48 EXTENSION_FUNCTION_VALIDATE(false);
50 #else 49 #else
51 chromeos::input_method::InputMethodManager* manager = 50 chromeos::input_method::InputMethodManager* manager =
52 chromeos::input_method::InputMethodManager::Get(); 51 chromeos::input_method::InputMethodManager::Get();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > 144 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> >
146 g_factory = LAZY_INSTANCE_INITIALIZER; 145 g_factory = LAZY_INSTANCE_INITIALIZER;
147 146
148 // static 147 // static
149 BrowserContextKeyedAPIFactory<InputMethodAPI>* 148 BrowserContextKeyedAPIFactory<InputMethodAPI>*
150 InputMethodAPI::GetFactoryInstance() { 149 InputMethodAPI::GetFactoryInstance() {
151 return g_factory.Pointer(); 150 return g_factory.Pointer();
152 } 151 }
153 152
154 } // namespace extensions 153 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698