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

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

Issue 1556783002: Convert Pass()→std::move() for CrOS extension code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_event_router.h" 5 #include "chrome/browser/chromeos/extensions/input_method_event_router.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility>
8 9
9 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "chrome/browser/chromeos/extensions/input_method_api.h" 12 #include "chrome/browser/chromeos/extensions/input_method_api.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
14 #include "extensions/browser/event_router.h" 15 #include "extensions/browser/event_router.h"
15 #include "extensions/browser/extension_system.h" 16 #include "extensions/browser/extension_system.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
(...skipping 22 matching lines...) Expand all
40 return; 41 return;
41 } 42 }
42 43
43 scoped_ptr<base::ListValue> args(new base::ListValue()); 44 scoped_ptr<base::ListValue> args(new base::ListValue());
44 args->Append(new base::StringValue( 45 args->Append(new base::StringValue(
45 manager->GetActiveIMEState()->GetCurrentInputMethod().id())); 46 manager->GetActiveIMEState()->GetCurrentInputMethod().id()));
46 47
47 // The router will only send the event to extensions that are listening. 48 // The router will only send the event to extensions that are listening.
48 scoped_ptr<extensions::Event> event(new extensions::Event( 49 scoped_ptr<extensions::Event> event(new extensions::Event(
49 extensions::events::INPUT_METHOD_PRIVATE_ON_CHANGED, 50 extensions::events::INPUT_METHOD_PRIVATE_ON_CHANGED,
50 extensions::InputMethodAPI::kOnInputMethodChanged, args.Pass())); 51 extensions::InputMethodAPI::kOnInputMethodChanged, std::move(args)));
51 event->restrict_to_browser_context = context_; 52 event->restrict_to_browser_context = context_;
52 router->BroadcastEvent(event.Pass()); 53 router->BroadcastEvent(std::move(event));
53 } 54 }
54 55
55 } // namespace chromeos 56 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/input_method_api.cc ('k') | chrome/browser/chromeos/extensions/launcher_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698