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

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

Issue 106433007: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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 | Annotate | Revision Log
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 "input_method_event_router.h" 5 #include "input_method_event_router.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 18 matching lines...) Expand all
29 void ExtensionInputMethodEventRouter::InputMethodChanged( 29 void ExtensionInputMethodEventRouter::InputMethodChanged(
30 input_method::InputMethodManager *manager, 30 input_method::InputMethodManager *manager,
31 bool show_message) { 31 bool show_message) {
32 extensions::EventRouter *router = 32 extensions::EventRouter *router =
33 extensions::ExtensionSystem::GetForBrowserContext(context_)-> 33 extensions::ExtensionSystem::GetForBrowserContext(context_)->
34 event_router(); 34 event_router();
35 35
36 if (!router->HasEventListener(extensions::event_names::kOnInputMethodChanged)) 36 if (!router->HasEventListener(extensions::event_names::kOnInputMethodChanged))
37 return; 37 return;
38 38
39 scoped_ptr<ListValue> args(new ListValue()); 39 scoped_ptr<base::ListValue> args(new base::ListValue());
40 StringValue *input_method_name = new StringValue( 40 base::StringValue *input_method_name = new base::StringValue(
41 extensions::InputMethodAPI::GetInputMethodForXkb( 41 extensions::InputMethodAPI::GetInputMethodForXkb(
42 manager->GetCurrentInputMethod().id())); 42 manager->GetCurrentInputMethod().id()));
43 args->Append(input_method_name); 43 args->Append(input_method_name);
44 44
45 // The router will only send the event to extensions that are listening. 45 // The router will only send the event to extensions that are listening.
46 scoped_ptr<extensions::Event> event(new extensions::Event( 46 scoped_ptr<extensions::Event> event(new extensions::Event(
47 extensions::event_names::kOnInputMethodChanged, args.Pass())); 47 extensions::event_names::kOnInputMethodChanged, args.Pass()));
48 event->restrict_to_browser_context = context_; 48 event->restrict_to_browser_context = context_;
49 router->BroadcastEvent(event.Pass()); 49 router->BroadcastEvent(event.Pass());
50 } 50 }
51 51
52 } // namespace chromeos 52 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698