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

Side by Side Diff: ppapi/proxy/ppb_message_loop_proxy.cc

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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) 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 "ppapi/proxy/ppb_message_loop_proxy.h" 5 #include "ppapi/proxy/ppb_message_loop_proxy.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Since we allow tasks to be posted before the message loop is actually 80 // Since we allow tasks to be posted before the message loop is actually
81 // created (when it's associated with a thread), we keep tasks posted here 81 // created (when it's associated with a thread), we keep tasks posted here
82 // until that happens. Once the loop_ is created, this is unused. 82 // until that happens. Once the loop_ is created, this is unused.
83 std::vector<TaskInfo> pending_tasks_; 83 std::vector<TaskInfo> pending_tasks_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(MessageLoopResource); 85 DISALLOW_COPY_AND_ASSIGN(MessageLoopResource);
86 }; 86 };
87 87
88 MessageLoopResource::MessageLoopResource(PP_Instance instance) 88 MessageLoopResource::MessageLoopResource(PP_Instance instance)
89 : Resource(HostResource::MakeInstanceOnly(instance)), 89 : Resource(OBJECT_IS_PROXY, instance),
90 nested_invocations_(0), 90 nested_invocations_(0),
91 destroyed_(false), 91 destroyed_(false),
92 should_destroy_(false) { 92 should_destroy_(false) {
93 } 93 }
94 94
95 MessageLoopResource::~MessageLoopResource() { 95 MessageLoopResource::~MessageLoopResource() {
96 } 96 }
97 97
98 PPB_MessageLoop_API* MessageLoopResource::AsPPB_MessageLoop_API() { 98 PPB_MessageLoop_API* MessageLoopResource::AsPPB_MessageLoop_API() {
99 return this; 99 return this;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { 286 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() {
287 } 287 }
288 288
289 // static 289 // static
290 const PPB_MessageLoop_Dev_0_1* PPB_MessageLoop_Proxy::GetInterface() { 290 const PPB_MessageLoop_Dev_0_1* PPB_MessageLoop_Proxy::GetInterface() {
291 return &ppb_message_loop_interface; 291 return &ppb_message_loop_interface;
292 } 292 }
293 293
294 } // namespace proxy 294 } // namespace proxy
295 } // namespace ppapi 295 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698