OLD | NEW |
---|---|
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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 next_plugin_dispatcher_id_(1) { | 106 next_plugin_dispatcher_id_(1) { |
107 ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get(); | 107 ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get(); |
108 globals->SetPluginProxyDelegate(this); | 108 globals->SetPluginProxyDelegate(this); |
109 globals->set_command_line( | 109 globals->set_command_line( |
110 command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); | 110 command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); |
111 | 111 |
112 blink_platform_impl_.reset(new PpapiBlinkPlatformImpl); | 112 blink_platform_impl_.reset(new PpapiBlinkPlatformImpl); |
113 blink::initialize(blink_platform_impl_.get()); | 113 blink::initialize(blink_platform_impl_.get()); |
114 | 114 |
115 if (!is_broker_) { | 115 if (!is_broker_) { |
116 channel()->AddFilter( | 116 scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter( |
117 new ppapi::proxy::PluginMessageFilter( | 117 new ppapi::proxy::PluginMessageFilter( |
118 NULL, globals->resource_reply_thread_registrar())); | 118 NULL, globals->resource_reply_thread_registrar())); |
119 channel()->AddFilter(plugin_filter.get()); | |
120 globals->RegisterResourceMessageFilters(plugin_filter.get()); | |
raymes
2015/03/03 03:07:44
I guess both these add references?
dmichael (off chromium)
2015/03/03 18:27:56
This is a little confusing, and I struggled with h
| |
119 } | 121 } |
120 } | 122 } |
121 | 123 |
122 PpapiThread::~PpapiThread() { | 124 PpapiThread::~PpapiThread() { |
123 } | 125 } |
124 | 126 |
125 void PpapiThread::Shutdown() { | 127 void PpapiThread::Shutdown() { |
126 ChildThreadImpl::Shutdown(); | 128 ChildThreadImpl::Shutdown(); |
127 | 129 |
128 ppapi::proxy::PluginGlobals::Get()->ResetPluginProxyDelegate(); | 130 ppapi::proxy::PluginGlobals::Get()->ResetPluginProxyDelegate(); |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
546 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + | 548 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + |
547 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); | 549 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); |
548 | 550 |
549 // For sparse histograms, we can use the macro, as it does not incorporate a | 551 // For sparse histograms, we can use the macro, as it does not incorporate a |
550 // static. | 552 // static. |
551 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); | 553 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); |
552 #endif | 554 #endif |
553 } | 555 } |
554 | 556 |
555 } // namespace content | 557 } // namespace content |
OLD | NEW |