OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/examples/pepper_container_app/mojo_ppapi_globals.h" | 5 #include "mojo/examples/pepper_container_app/mojo_ppapi_globals.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" |
8 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
9 #include "base/time/time.h" | 10 #include "base/time/time.h" |
10 #include "mojo/examples/pepper_container_app/plugin_instance.h" | 11 #include "mojo/examples/pepper_container_app/plugin_instance.h" |
11 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
12 #include "ppapi/shared_impl/ppb_message_loop_shared.h" | 13 #include "ppapi/shared_impl/ppb_message_loop_shared.h" |
13 | 14 |
14 namespace mojo { | 15 namespace mojo { |
15 namespace examples { | 16 namespace examples { |
16 | 17 |
17 namespace { | 18 namespace { |
(...skipping 10 matching lines...) Expand all Loading... |
28 : public ppapi::MessageLoopShared { | 29 : public ppapi::MessageLoopShared { |
29 public: | 30 public: |
30 explicit MainThreadMessageLoopResource( | 31 explicit MainThreadMessageLoopResource( |
31 base::MessageLoopProxy* main_thread_message_loop) | 32 base::MessageLoopProxy* main_thread_message_loop) |
32 : MessageLoopShared(ForMainThread()), | 33 : MessageLoopShared(ForMainThread()), |
33 main_thread_message_loop_(main_thread_message_loop) {} | 34 main_thread_message_loop_(main_thread_message_loop) {} |
34 | 35 |
35 // ppapi::MessageLoopShared implementation. | 36 // ppapi::MessageLoopShared implementation. |
36 virtual void PostClosure(const tracked_objects::Location& from_here, | 37 virtual void PostClosure(const tracked_objects::Location& from_here, |
37 const base::Closure& closure, | 38 const base::Closure& closure, |
38 int64 delay_ms) OVERRIDE { | 39 int64 delay_ms) override { |
39 main_thread_message_loop_->PostDelayedTask( | 40 main_thread_message_loop_->PostDelayedTask( |
40 from_here, closure, base::TimeDelta::FromMilliseconds(delay_ms)); | 41 from_here, closure, base::TimeDelta::FromMilliseconds(delay_ms)); |
41 } | 42 } |
42 | 43 |
43 virtual base::MessageLoopProxy* GetMessageLoopProxy() OVERRIDE { | 44 virtual base::MessageLoopProxy* GetMessageLoopProxy() override { |
44 return main_thread_message_loop_.get(); | 45 return main_thread_message_loop_.get(); |
45 } | 46 } |
46 | 47 |
47 virtual bool CurrentlyHandlingBlockingMessage() OVERRIDE { | 48 virtual bool CurrentlyHandlingBlockingMessage() override { |
48 return false; | 49 return false; |
49 } | 50 } |
50 | 51 |
51 // ppapi::thunk::PPB_MessageLoop_API implementation. | 52 // ppapi::thunk::PPB_MessageLoop_API implementation. |
52 virtual int32_t AttachToCurrentThread() OVERRIDE { | 53 virtual int32_t AttachToCurrentThread() override { |
53 NOTIMPLEMENTED(); | 54 NOTIMPLEMENTED(); |
54 return PP_ERROR_FAILED; | 55 return PP_ERROR_FAILED; |
55 } | 56 } |
56 | 57 |
57 virtual int32_t Run() OVERRIDE { | 58 virtual int32_t Run() override { |
58 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
59 return PP_ERROR_FAILED; | 60 return PP_ERROR_FAILED; |
60 } | 61 } |
61 | 62 |
62 virtual int32_t PostWork(PP_CompletionCallback callback, | 63 virtual int32_t PostWork(PP_CompletionCallback callback, |
63 int64_t delay_ms) OVERRIDE { | 64 int64_t delay_ms) override { |
64 NOTIMPLEMENTED(); | 65 NOTIMPLEMENTED(); |
65 return PP_ERROR_FAILED; | 66 return PP_ERROR_FAILED; |
66 } | 67 } |
67 | 68 |
68 virtual int32_t PostQuit(PP_Bool should_destroy) OVERRIDE { | 69 virtual int32_t PostQuit(PP_Bool should_destroy) override { |
69 NOTIMPLEMENTED(); | 70 NOTIMPLEMENTED(); |
70 return PP_ERROR_FAILED; | 71 return PP_ERROR_FAILED; |
71 } | 72 } |
72 | 73 |
73 private: | 74 private: |
74 virtual ~MainThreadMessageLoopResource() {} | 75 virtual ~MainThreadMessageLoopResource() {} |
75 | 76 |
76 scoped_refptr<base::MessageLoopProxy> main_thread_message_loop_; | 77 scoped_refptr<base::MessageLoopProxy> main_thread_message_loop_; |
77 DISALLOW_COPY_AND_ASSIGN(MainThreadMessageLoopResource); | 78 DISALLOW_COPY_AND_ASSIGN(MainThreadMessageLoopResource); |
78 }; | 79 }; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 NOTIMPLEMENTED(); | 180 NOTIMPLEMENTED(); |
180 return std::string(); | 181 return std::string(); |
181 } | 182 } |
182 | 183 |
183 void MojoPpapiGlobals::PreCacheFontForFlash(const void* logfontw) { | 184 void MojoPpapiGlobals::PreCacheFontForFlash(const void* logfontw) { |
184 NOTIMPLEMENTED(); | 185 NOTIMPLEMENTED(); |
185 } | 186 } |
186 | 187 |
187 } // namespace examples | 188 } // namespace examples |
188 } // namespace mojo | 189 } // namespace mojo |
OLD | NEW |