OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 class PepperPluginDelegateImpl | 74 class PepperPluginDelegateImpl |
75 : public webkit::ppapi::PluginDelegate, | 75 : public webkit::ppapi::PluginDelegate, |
76 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, | 76 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, |
77 public PepperParentContextProvider, | 77 public PepperParentContextProvider, |
78 public RenderViewObserver { | 78 public RenderViewObserver { |
79 public: | 79 public: |
80 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); | 80 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); |
81 virtual ~PepperPluginDelegateImpl(); | 81 virtual ~PepperPluginDelegateImpl(); |
82 | 82 |
| 83 RenderViewImpl* render_view() { return render_view_; } |
| 84 |
83 // Attempts to create a PPAPI plugin for the given filepath. On success, it | 85 // Attempts to create a PPAPI plugin for the given filepath. On success, it |
84 // will return the newly-created module. | 86 // will return the newly-created module. |
85 // | 87 // |
86 // There are two reasons for failure. The first is that the plugin isn't | 88 // There are two reasons for failure. The first is that the plugin isn't |
87 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set | 89 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set |
88 // to false and the caller may want to fall back on creating an NPAPI plugin. | 90 // to false and the caller may want to fall back on creating an NPAPI plugin. |
89 // the second is that the plugin failed to initialize. In this case, | 91 // the second is that the plugin failed to initialize. In this case, |
90 // |*pepper_plugin_was_registered| will be set to true and the caller should | 92 // |*pepper_plugin_was_registered| will be set to true and the caller should |
91 // not fall back on any other plugin types. | 93 // not fall back on any other plugin types. |
92 CONTENT_EXPORT scoped_refptr<webkit::ppapi::PluginModule> | 94 CONTENT_EXPORT scoped_refptr<webkit::ppapi::PluginModule> |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 | 515 |
514 scoped_ptr<PepperDeviceEnumerationEventHandler> | 516 scoped_ptr<PepperDeviceEnumerationEventHandler> |
515 device_enumeration_event_handler_; | 517 device_enumeration_event_handler_; |
516 | 518 |
517 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 519 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
518 }; | 520 }; |
519 | 521 |
520 } // namespace content | 522 } // namespace content |
521 | 523 |
522 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 524 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |