| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/process.h" | 10 #include "base/process.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // The plugin maintains a global Dispatcher pointer. There is only one since | 39 // The plugin maintains a global Dispatcher pointer. There is only one since |
| 40 // there is only one connection to the browser. Don't call this on the | 40 // there is only one connection to the browser. Don't call this on the |
| 41 // browser side, see GetForInstnace. | 41 // browser side, see GetForInstnace. |
| 42 static PluginDispatcher* Get(); | 42 static PluginDispatcher* Get(); |
| 43 static void SetGlobal(PluginDispatcher* dispatcher); | 43 static void SetGlobal(PluginDispatcher* dispatcher); |
| 44 | 44 |
| 45 // Dispatcher overrides. | 45 // Dispatcher overrides. |
| 46 virtual bool IsPlugin() const; | 46 virtual bool IsPlugin() const; |
| 47 | 47 |
| 48 // IPC::Channel::Listener implementation. | 48 // IPC::Channel::Listener implementation. |
| 49 virtual void OnMessageReceived(const IPC::Message& msg); | 49 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 50 | 50 |
| 51 // Returns the resource tracker for the plugin. In the browser process this | 51 // Returns the resource tracker for the plugin. In the browser process this |
| 52 // will return NULL. | 52 // will return NULL. |
| 53 PluginResourceTracker* plugin_resource_tracker() { | 53 PluginResourceTracker* plugin_resource_tracker() { |
| 54 return plugin_resource_tracker_.get(); | 54 return plugin_resource_tracker_.get(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // Returns the var tracker for the plugin. In the browser process this | 57 // Returns the var tracker for the plugin. In the browser process this |
| 58 // will return NULL. | 58 // will return NULL. |
| 59 PluginVarTracker* plugin_var_tracker() { | 59 PluginVarTracker* plugin_var_tracker() { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 71 scoped_ptr<PluginResourceTracker> plugin_resource_tracker_; | 71 scoped_ptr<PluginResourceTracker> plugin_resource_tracker_; |
| 72 scoped_ptr<PluginVarTracker> plugin_var_tracker_; | 72 scoped_ptr<PluginVarTracker> plugin_var_tracker_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); | 74 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace proxy | 77 } // namespace proxy |
| 78 } // namespace pp | 78 } // namespace pp |
| 79 | 79 |
| 80 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ | 80 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ |
| OLD | NEW |