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

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

Issue 3052040: Chromium-side implemention of pepper's FileChooser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/weak_ptr.h" 12 #include "base/weak_ptr.h"
13 #include "webkit/glue/plugins/pepper_plugin_delegate.h" 13 #include "webkit/glue/plugins/pepper_plugin_delegate.h"
14 #include "webkit/glue/plugins/pepper_plugin_instance.h" 14 #include "webkit/glue/plugins/pepper_plugin_instance.h"
15 15
16 class RenderView; 16 class RenderView;
17 17
18 namespace pepper { 18 namespace pepper {
19 class PluginInstance; 19 class PluginInstance;
20 } 20 }
21 21
22 namespace WebKit {
23 class WebFileChooserCompletion;
24 struct WebFileChooserParams;
25 }
26
22 class PepperPluginDelegateImpl 27 class PepperPluginDelegateImpl
23 : public pepper::PluginDelegate, 28 : public pepper::PluginDelegate,
24 public base::SupportsWeakPtr<PepperPluginDelegateImpl> { 29 public base::SupportsWeakPtr<PepperPluginDelegateImpl> {
25 public: 30 public:
26 explicit PepperPluginDelegateImpl(RenderView* render_view); 31 explicit PepperPluginDelegateImpl(RenderView* render_view);
27 virtual ~PepperPluginDelegateImpl() {} 32 virtual ~PepperPluginDelegateImpl() {}
28 33
29 // Called by RenderView to tell us about painting events, these two functions 34 // Called by RenderView to tell us about painting events, these two functions
30 // just correspond to the DidInitiatePaint and DidFlushPaint in R.V.. 35 // just correspond to the DidInitiatePaint and DidFlushPaint in R.V..
31 void ViewInitiatedPaint(); 36 void ViewInitiatedPaint();
32 void ViewFlushedPaint(); 37 void ViewFlushedPaint();
33 38
34 // pepper::PluginDelegate implementation. 39 // pepper::PluginDelegate implementation.
35 virtual void InstanceCreated(pepper::PluginInstance* instance); 40 virtual void InstanceCreated(pepper::PluginInstance* instance);
36 virtual void InstanceDeleted(pepper::PluginInstance* instance); 41 virtual void InstanceDeleted(pepper::PluginInstance* instance);
37 virtual PlatformAudio* CreateAudio( 42 virtual PlatformAudio* CreateAudio(
38 uint32_t sample_rate, 43 uint32_t sample_rate,
39 uint32_t sample_count, 44 uint32_t sample_count,
40 pepper::PluginDelegate::PlatformAudio::Client* client); 45 pepper::PluginDelegate::PlatformAudio::Client* client);
41 virtual PlatformImage2D* CreateImage2D(int width, int height); 46 virtual PlatformImage2D* CreateImage2D(int width, int height);
42 virtual void DidChangeNumberOfFindResults(int identifier, 47 virtual void DidChangeNumberOfFindResults(int identifier,
43 int total, 48 int total,
44 bool final_result); 49 bool final_result);
45 virtual void DidChangeSelectedFindResult(int identifier, int index); 50 virtual void DidChangeSelectedFindResult(int identifier, int index);
51 virtual bool RunFileChooser(
52 const WebKit::WebFileChooserParams& params,
53 WebKit::WebFileChooserCompletion* chooser_completion);
46 54
47 private: 55 private:
48 // Pointer to the RenderView that owns us. 56 // Pointer to the RenderView that owns us.
49 RenderView* render_view_; 57 RenderView* render_view_;
50 58
51 std::set<pepper::PluginInstance*> active_instances_; 59 std::set<pepper::PluginInstance*> active_instances_;
52 60
53 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 61 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
54 }; 62 };
55 63
56 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 64 #endif // CHROME_RENDERER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW
« DEPS ('K') | « DEPS ('k') | chrome/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698