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

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

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 content::RenderProcessHost::FromID(listener.process_id); 83 content::RenderProcessHost::FromID(listener.process_id);
84 rph->Send(new ExtensionMsg_AccessibilityEvent(listener.routing_id, 84 rph->Send(new ExtensionMsg_AccessibilityEvent(listener.routing_id,
85 params, 85 params,
86 listener.is_active_profile)); 86 listener.is_active_profile));
87 } 87 }
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 std::unique_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 std::unique_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 std::move(args))); 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(std::move(event)); 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
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // only mark one as active. 186 // only mark one as active.
187 listener.is_active_profile = (extension_id_count == 1 || 187 listener.is_active_profile = (extension_id_count == 1 ||
188 rph->GetBrowserContext() == active_profile_); 188 rph->GetBrowserContext() == active_profile_);
189 #else 189 #else
190 listener.is_active_profile = true; 190 listener.is_active_profile = true;
191 #endif 191 #endif
192 } 192 }
193 } 193 }
194 194
195 } // namespace extensions 195 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698