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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/plugin_module.h" 5 #include "webkit/plugins/ppapi/plugin_module.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // identifiers. 123 // identifiers.
124 typedef std::set<PluginModule*> PluginModuleSet; 124 typedef std::set<PluginModule*> PluginModuleSet;
125 125
126 PluginModuleSet* GetLivePluginSet() { 126 PluginModuleSet* GetLivePluginSet() {
127 static PluginModuleSet live_plugin_libs; 127 static PluginModuleSet live_plugin_libs;
128 return &live_plugin_libs; 128 return &live_plugin_libs;
129 } 129 }
130 130
131 base::MessageLoopProxy* GetMainThreadMessageLoop() { 131 base::MessageLoopProxy* GetMainThreadMessageLoop() {
132 static scoped_refptr<base::MessageLoopProxy> proxy( 132 static scoped_refptr<base::MessageLoopProxy> proxy(
133 base::MessageLoopProxy::CreateForCurrentThread()); 133 base::MessageLoopProxy::current());
134 return proxy.get(); 134 return proxy.get();
135 } 135 }
136 136
137 // PPB_Core -------------------------------------------------------------------- 137 // PPB_Core --------------------------------------------------------------------
138 138
139 void AddRefResource(PP_Resource resource) { 139 void AddRefResource(PP_Resource resource) {
140 if (!ResourceTracker::Get()->AddRefResource(resource)) { 140 if (!ResourceTracker::Get()->AddRefResource(resource)) {
141 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource; 141 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource;
142 } 142 }
143 } 143 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 592 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
593 if (retval != 0) { 593 if (retval != 0) {
594 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 594 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
595 return false; 595 return false;
596 } 596 }
597 return true; 597 return true;
598 } 598 }
599 599
600 } // namespace ppapi 600 } // namespace ppapi
601 } // namespace webkit 601 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider_unittest.cc ('k') | webkit/plugins/ppapi/quota_file_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698