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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #endif 91 #endif
92 } 92 }
93 93
94 ExtensionFunction::ResponseAction 94 ExtensionFunction::ResponseAction
95 InputMethodPrivateGetCurrentInputMethodFunction::Run() { 95 InputMethodPrivateGetCurrentInputMethodFunction::Run() {
96 #if !defined(OS_CHROMEOS) 96 #if !defined(OS_CHROMEOS)
97 EXTENSION_FUNCTION_VALIDATE(false); 97 EXTENSION_FUNCTION_VALIDATE(false);
98 #else 98 #else
99 chromeos::input_method::InputMethodManager* manager = 99 chromeos::input_method::InputMethodManager* manager =
100 chromeos::input_method::InputMethodManager::Get(); 100 chromeos::input_method::InputMethodManager::Get();
101 return RespondNow(OneArgument(base::MakeUnique<base::StringValue>( 101 return RespondNow(OneArgument(base::MakeUnique<base::Value>(
102 manager->GetActiveIMEState()->GetCurrentInputMethod().id()))); 102 manager->GetActiveIMEState()->GetCurrentInputMethod().id())));
103 #endif 103 #endif
104 } 104 }
105 105
106 ExtensionFunction::ResponseAction 106 ExtensionFunction::ResponseAction
107 InputMethodPrivateSetCurrentInputMethodFunction::Run() { 107 InputMethodPrivateSetCurrentInputMethodFunction::Run() {
108 #if !defined(OS_CHROMEOS) 108 #if !defined(OS_CHROMEOS)
109 EXTENSION_FUNCTION_VALIDATE(false); 109 EXTENSION_FUNCTION_VALIDATE(false);
110 #else 110 #else
111 std::unique_ptr<SetCurrentInputMethod::Params> params( 111 std::unique_ptr<SetCurrentInputMethod::Params> params(
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > 370 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> >
371 g_factory = LAZY_INSTANCE_INITIALIZER; 371 g_factory = LAZY_INSTANCE_INITIALIZER;
372 372
373 // static 373 // static
374 BrowserContextKeyedAPIFactory<InputMethodAPI>* 374 BrowserContextKeyedAPIFactory<InputMethodAPI>*
375 InputMethodAPI::GetFactoryInstance() { 375 InputMethodAPI::GetFactoryInstance() {
376 return g_factory.Pointer(); 376 return g_factory.Pointer();
377 } 377 }
378 378
379 } // namespace extensions 379 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698