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

Side by Side Diff: webkit/plugins/ppapi/ppb_flash_message_loop_impl.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 "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" 5 #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 10
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 private: 36 private:
37 int32_t result_; 37 int32_t result_;
38 bool run_called_; 38 bool run_called_;
39 bool quit_called_; 39 bool quit_called_;
40 RunFromHostProxyCallback run_callback_; 40 RunFromHostProxyCallback run_callback_;
41 }; 41 };
42 42
43 PPB_Flash_MessageLoop_Impl::PPB_Flash_MessageLoop_Impl(PP_Instance instance) 43 PPB_Flash_MessageLoop_Impl::PPB_Flash_MessageLoop_Impl(PP_Instance instance)
44 : Resource(instance), 44 : Resource(::ppapi::OBJECT_IS_IMPL, instance),
45 state_(new State()) { 45 state_(new State()) {
46 } 46 }
47 47
48 PPB_Flash_MessageLoop_Impl::~PPB_Flash_MessageLoop_Impl() { 48 PPB_Flash_MessageLoop_Impl::~PPB_Flash_MessageLoop_Impl() {
49 // It is a no-op if either Run() hasn't been called or Quit() has been called 49 // It is a no-op if either Run() hasn't been called or Quit() has been called
50 // to balance the call to Run(). 50 // to balance the call to Run().
51 InternalQuit(PP_ERROR_ABORTED); 51 InternalQuit(PP_ERROR_ABORTED);
52 } 52 }
53 53
54 // static 54 // static
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 state_->set_result(result); 105 state_->set_result(result);
106 106
107 MessageLoop::current()->QuitNow(); 107 MessageLoop::current()->QuitNow();
108 108
109 if (!state_->run_callback().is_null()) 109 if (!state_->run_callback().is_null())
110 state_->run_callback().Run(result); 110 state_->run_callback().Run(result);
111 } 111 }
112 112
113 } // namespace ppapi 113 } // namespace ppapi
114 } // namespace webkit 114 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698