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

Side by Side Diff: chrome/browser/extensions/api/automation_internal/automation_event_router.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/automation_internal/automation_event_rou ter.h" 5 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou ter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 void AutomationEventRouter::DispatchTreeDestroyedEvent( 90 void AutomationEventRouter::DispatchTreeDestroyedEvent(
91 int tree_id, 91 int tree_id,
92 content::BrowserContext* browser_context) { 92 content::BrowserContext* browser_context) {
93 scoped_ptr<base::ListValue> args( 93 scoped_ptr<base::ListValue> args(
94 api::automation_internal::OnAccessibilityTreeDestroyed::Create(tree_id)); 94 api::automation_internal::OnAccessibilityTreeDestroyed::Create(tree_id));
95 scoped_ptr<Event> event(new Event( 95 scoped_ptr<Event> event(new Event(
96 events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_TREE_DESTROYED, 96 events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_TREE_DESTROYED,
97 api::automation_internal::OnAccessibilityTreeDestroyed::kEventName, 97 api::automation_internal::OnAccessibilityTreeDestroyed::kEventName,
98 args.Pass())); 98 std::move(args)));
99 event->restrict_to_browser_context = browser_context; 99 event->restrict_to_browser_context = browser_context;
100 EventRouter::Get(browser_context)->BroadcastEvent(event.Pass()); 100 EventRouter::Get(browser_context)->BroadcastEvent(std::move(event));
101 } 101 }
102 102
103 AutomationEventRouter::AutomationListener::AutomationListener() { 103 AutomationEventRouter::AutomationListener::AutomationListener() {
104 } 104 }
105 105
106 AutomationEventRouter::AutomationListener::~AutomationListener() { 106 AutomationEventRouter::AutomationListener::~AutomationListener() {
107 } 107 }
108 108
109 void AutomationEventRouter::Register( 109 void AutomationEventRouter::Register(
110 const ExtensionId& extension_id, 110 const ExtensionId& extension_id,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // only mark one as active. 183 // only mark one as active.
184 listener.is_active_profile = (extension_id_count == 1 || 184 listener.is_active_profile = (extension_id_count == 1 ||
185 rph->GetBrowserContext() == active_profile_); 185 rph->GetBrowserContext() == active_profile_);
186 #else 186 #else
187 listener.is_active_profile = true; 187 listener.is_active_profile = true;
188 #endif 188 #endif
189 } 189 }
190 } 190 }
191 191
192 } // namespace extensions 192 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698