Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: chrome/renderer/pepper_plugin_delegate_impl.h

Issue 2862002: Implement more of Flush properly. This adds support for waiting on the messag... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 7
8 #include <set>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/weak_ptr.h" 11 #include "base/weak_ptr.h"
10 #include "webkit/glue/plugins/pepper_plugin_delegate.h" 12 #include "webkit/glue/plugins/pepper_plugin_delegate.h"
11 13
12 class RenderView; 14 class RenderView;
13 15
16 namespace pepper {
17 class PluginInstance;
18 }
19
14 class PepperPluginDelegateImpl 20 class PepperPluginDelegateImpl
15 : public pepper::PluginDelegate, 21 : public pepper::PluginDelegate,
16 public base::SupportsWeakPtr<PepperPluginDelegateImpl> { 22 public base::SupportsWeakPtr<PepperPluginDelegateImpl> {
17 public: 23 public:
18 explicit PepperPluginDelegateImpl(RenderView* render_view); 24 explicit PepperPluginDelegateImpl(RenderView* render_view);
19 25
26 // Called by RenderView to tell us about painting events, these two functions
27 // just correspond to the DidInitiatePaint and DidFlushPaint in R.V..
28 void ViewInitiatedPaint();
29 void ViewFlushedPaint();
30
20 // pepper::PluginDelegate implementation. 31 // pepper::PluginDelegate implementation.
32 virtual void InstanceCreated(pepper::PluginInstance* instance);
33 virtual void InstanceDeleted(pepper::PluginInstance* instance);
21 virtual PlatformImage2D* CreateImage2D(int width, int height); 34 virtual PlatformImage2D* CreateImage2D(int width, int height);
22 35
23 private: 36 private:
24 // Pointer to the RenderView that owns us. 37 // Pointer to the RenderView that owns us.
25 RenderView* render_view_; 38 RenderView* render_view_;
26 39
40 std::set<pepper::PluginInstance*> active_instances_;
41
27 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 42 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
28 }; 43 };
29 44
30 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 45 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_devices_unittest.cc ('k') | chrome/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698