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 CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 5 #ifndef CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
6 #define CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 6 #define CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Converts the IPC messages from WebPluginDelegateProxy into calls to the | 38 // Converts the IPC messages from WebPluginDelegateProxy into calls to the |
39 // actual WebPluginDelegateImpl object. | 39 // actual WebPluginDelegateImpl object. |
40 class WebPluginDelegateStub : public IPC::Channel::Listener, | 40 class WebPluginDelegateStub : public IPC::Channel::Listener, |
41 public IPC::Message::Sender, | 41 public IPC::Message::Sender, |
42 public base::RefCounted<WebPluginDelegateStub> { | 42 public base::RefCounted<WebPluginDelegateStub> { |
43 public: | 43 public: |
44 WebPluginDelegateStub(const std::string& mime_type, int instance_id, | 44 WebPluginDelegateStub(const std::string& mime_type, int instance_id, |
45 PluginChannel* channel); | 45 PluginChannel* channel); |
46 | 46 |
47 // IPC::Channel::Listener implementation: | 47 // IPC::Channel::Listener implementation: |
48 virtual void OnMessageReceived(const IPC::Message& msg); | 48 virtual bool OnMessageReceived(const IPC::Message& msg); |
49 | 49 |
50 // IPC::Message::Sender implementation: | 50 // IPC::Message::Sender implementation: |
51 virtual bool Send(IPC::Message* msg); | 51 virtual bool Send(IPC::Message* msg); |
52 | 52 |
53 int instance_id() { return instance_id_; } | 53 int instance_id() { return instance_id_; } |
54 WebPluginProxy* webplugin() { return webplugin_; } | 54 WebPluginProxy* webplugin() { return webplugin_; } |
55 | 55 |
56 private: | 56 private: |
57 friend class base::RefCounted<WebPluginDelegateStub>; | 57 friend class base::RefCounted<WebPluginDelegateStub>; |
58 | 58 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // browser. | 133 // browser. |
134 void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window); | 134 void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window); |
135 #endif | 135 #endif |
136 | 136 |
137 #endif | 137 #endif |
138 | 138 |
139 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); | 139 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); |
140 }; | 140 }; |
141 | 141 |
142 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 142 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
OLD | NEW |