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 #ifndef MOJO_EXAMPLES_PEPPER_CONTAINER_APP_MOJO_PPAPI_GLOBALS_H_ | 5 #ifndef MOJO_EXAMPLES_PEPPER_CONTAINER_APP_MOJO_PPAPI_GLOBALS_H_ |
6 #define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_MOJO_PPAPI_GLOBALS_H_ | 6 #define MOJO_EXAMPLES_PEPPER_CONTAINER_APP_MOJO_PPAPI_GLOBALS_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | |
9 #include "base/macros.h" | 8 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
11 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
12 #include "ppapi/shared_impl/ppapi_globals.h" | 11 #include "ppapi/shared_impl/ppapi_globals.h" |
13 #include "ppapi/shared_impl/resource_tracker.h" | 12 #include "ppapi/shared_impl/resource_tracker.h" |
14 | 13 |
15 namespace base { | 14 namespace base { |
16 class MessageLoopProxy; | 15 class MessageLoopProxy; |
17 } | 16 } |
18 | 17 |
(...skipping 19 matching lines...) Expand all Loading... |
38 return static_cast<MojoPpapiGlobals*>(PpapiGlobals::Get()); | 37 return static_cast<MojoPpapiGlobals*>(PpapiGlobals::Get()); |
39 } | 38 } |
40 | 39 |
41 PP_Instance AddInstance(PluginInstance* instance); | 40 PP_Instance AddInstance(PluginInstance* instance); |
42 void InstanceDeleted(PP_Instance instance); | 41 void InstanceDeleted(PP_Instance instance); |
43 PluginInstance* GetInstance(PP_Instance instance); | 42 PluginInstance* GetInstance(PP_Instance instance); |
44 | 43 |
45 ScopedMessagePipeHandle CreateGLES2Context(); | 44 ScopedMessagePipeHandle CreateGLES2Context(); |
46 | 45 |
47 // ppapi::PpapiGlobals implementation. | 46 // ppapi::PpapiGlobals implementation. |
48 virtual ppapi::ResourceTracker* GetResourceTracker() OVERRIDE; | 47 virtual ppapi::ResourceTracker* GetResourceTracker() override; |
49 virtual ppapi::VarTracker* GetVarTracker() OVERRIDE; | 48 virtual ppapi::VarTracker* GetVarTracker() override; |
50 virtual ppapi::CallbackTracker* GetCallbackTrackerForInstance( | 49 virtual ppapi::CallbackTracker* GetCallbackTrackerForInstance( |
51 PP_Instance instance) OVERRIDE; | 50 PP_Instance instance) override; |
52 virtual void LogWithSource(PP_Instance instance, | 51 virtual void LogWithSource(PP_Instance instance, |
53 PP_LogLevel level, | 52 PP_LogLevel level, |
54 const std::string& source, | 53 const std::string& source, |
55 const std::string& value) OVERRIDE; | 54 const std::string& value) override; |
56 virtual void BroadcastLogWithSource(PP_Module module, | 55 virtual void BroadcastLogWithSource(PP_Module module, |
57 PP_LogLevel level, | 56 PP_LogLevel level, |
58 const std::string& source, | 57 const std::string& source, |
59 const std::string& value) OVERRIDE; | 58 const std::string& value) override; |
60 virtual ppapi::thunk::PPB_Instance_API* GetInstanceAPI( | 59 virtual ppapi::thunk::PPB_Instance_API* GetInstanceAPI( |
61 PP_Instance instance) OVERRIDE; | 60 PP_Instance instance) override; |
62 virtual ppapi::thunk::ResourceCreationAPI* GetResourceCreationAPI( | 61 virtual ppapi::thunk::ResourceCreationAPI* GetResourceCreationAPI( |
63 PP_Instance instance) OVERRIDE; | 62 PP_Instance instance) override; |
64 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; | 63 virtual PP_Module GetModuleForInstance(PP_Instance instance) override; |
65 virtual ppapi::MessageLoopShared* GetCurrentMessageLoop() OVERRIDE; | 64 virtual ppapi::MessageLoopShared* GetCurrentMessageLoop() override; |
66 virtual base::TaskRunner* GetFileTaskRunner() OVERRIDE; | 65 virtual base::TaskRunner* GetFileTaskRunner() override; |
67 virtual std::string GetCmdLine() OVERRIDE; | 66 virtual std::string GetCmdLine() override; |
68 virtual void PreCacheFontForFlash(const void* logfontw) OVERRIDE; | 67 virtual void PreCacheFontForFlash(const void* logfontw) override; |
69 | 68 |
70 private: | 69 private: |
71 class MainThreadMessageLoopResource; | 70 class MainThreadMessageLoopResource; |
72 | 71 |
73 // Non-owning pointer. | 72 // Non-owning pointer. |
74 Delegate* const delegate_; | 73 Delegate* const delegate_; |
75 | 74 |
76 // Non-owning pointer. | 75 // Non-owning pointer. |
77 PluginInstance* plugin_instance_; | 76 PluginInstance* plugin_instance_; |
78 | 77 |
79 ppapi::ResourceTracker resource_tracker_; | 78 ppapi::ResourceTracker resource_tracker_; |
80 | 79 |
81 scoped_refptr<MainThreadMessageLoopResource> | 80 scoped_refptr<MainThreadMessageLoopResource> |
82 main_thread_message_loop_resource_; | 81 main_thread_message_loop_resource_; |
83 | 82 |
84 DISALLOW_COPY_AND_ASSIGN(MojoPpapiGlobals); | 83 DISALLOW_COPY_AND_ASSIGN(MojoPpapiGlobals); |
85 }; | 84 }; |
86 | 85 |
87 } // namespace examples | 86 } // namespace examples |
88 } // namespace mojo | 87 } // namespace mojo |
89 | 88 |
90 #endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_MOJO_PPAPI_GLOBALS_H_ | 89 #endif // MOJO_EXAMPLES_PEPPER_CONTAINER_APP_MOJO_PPAPI_GLOBALS_H_ |
OLD | NEW |