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_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
6 #define CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
| 14 #include "base/ref_counted.h" |
14 #include "base/weak_ptr.h" | 15 #include "base/weak_ptr.h" |
15 #include "ppapi/c/pp_errors.h" | 16 #include "ppapi/c/pp_errors.h" |
16 #include "webkit/glue/plugins/pepper_plugin_delegate.h" | 17 #include "webkit/glue/plugins/pepper_plugin_delegate.h" |
17 #include "webkit/glue/plugins/pepper_plugin_instance.h" | 18 #include "webkit/glue/plugins/pepper_plugin_instance.h" |
18 | 19 |
19 class FilePath; | 20 class FilePath; |
20 class RenderView; | 21 class RenderView; |
21 | 22 |
22 namespace gfx { | 23 namespace gfx { |
23 class Rect; | 24 class Rect; |
24 } | 25 } |
25 | 26 |
26 namespace pepper { | 27 namespace pepper { |
27 class FileIO; | 28 class FileIO; |
28 class PluginInstance; | 29 class PluginInstance; |
| 30 class PluginModule; |
29 } | 31 } |
30 | 32 |
31 namespace WebKit { | 33 namespace WebKit { |
32 class WebFileChooserCompletion; | 34 class WebFileChooserCompletion; |
33 struct WebFileChooserParams; | 35 struct WebFileChooserParams; |
34 } | 36 } |
35 | 37 |
36 class TransportDIB; | 38 class TransportDIB; |
37 | 39 |
38 class PepperPluginDelegateImpl | 40 class PepperPluginDelegateImpl |
39 : public pepper::PluginDelegate, | 41 : public pepper::PluginDelegate, |
40 public base::SupportsWeakPtr<PepperPluginDelegateImpl> { | 42 public base::SupportsWeakPtr<PepperPluginDelegateImpl> { |
41 public: | 43 public: |
42 explicit PepperPluginDelegateImpl(RenderView* render_view); | 44 explicit PepperPluginDelegateImpl(RenderView* render_view); |
43 virtual ~PepperPluginDelegateImpl(); | 45 virtual ~PepperPluginDelegateImpl(); |
44 | 46 |
| 47 scoped_refptr<pepper::PluginModule> CreateOutOfProcessPepperPlugin( |
| 48 const FilePath& path); |
| 49 |
45 // Called by RenderView to tell us about painting events, these two functions | 50 // Called by RenderView to tell us about painting events, these two functions |
46 // just correspond to the DidInitiatePaint and DidFlushPaint in R.V.. | 51 // just correspond to the DidInitiatePaint and DidFlushPaint in R.V.. |
47 void ViewInitiatedPaint(); | 52 void ViewInitiatedPaint(); |
48 void ViewFlushedPaint(); | 53 void ViewFlushedPaint(); |
49 | 54 |
50 // Called by RenderView to implement the corresponding function in its base | 55 // Called by RenderView to implement the corresponding function in its base |
51 // class RenderWidget (see that for more). | 56 // class RenderWidget (see that for more). |
52 bool GetBitmapForOptimizedPluginPaint( | 57 bool GetBitmapForOptimizedPluginPaint( |
53 const gfx::Rect& paint_bounds, | 58 const gfx::Rect& paint_bounds, |
54 TransportDIB** dib, | 59 TransportDIB** dib, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 151 |
147 std::set<pepper::PluginInstance*> active_instances_; | 152 std::set<pepper::PluginInstance*> active_instances_; |
148 | 153 |
149 int id_generator_; | 154 int id_generator_; |
150 IDMap<AsyncOpenFileCallback> messages_waiting_replies_; | 155 IDMap<AsyncOpenFileCallback> messages_waiting_replies_; |
151 | 156 |
152 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 157 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
153 }; | 158 }; |
154 | 159 |
155 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 160 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |