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

Side by Side Diff: content/renderer/render_view_pepper_helper.h

Issue 11414180: Add a gyp flag to allow removing dependency on ppapi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_view_pepper_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // This interface is used by RenderView to talk to the pepper plugin delegate.
6 #ifndef CONTENT_RENDERER_RENDER_VIEW_PEPPER_HELPER_H
7 #define CONTENT_RENDERER_RENDER_VIEW_PEPPER_HELPER_H
8
9 #include <string>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/platform_file.h"
15 #include "ui/base/ime/text_input_type.h"
16
17 class TransportDIB;
18
19 namespace gfx {
20 class Rect;
21 }
22
23 namespace IPC {
24 struct ChannelHandle;
25 }
26
27 namespace ui {
28 class Range;
29 }
30
31 namespace webkit {
32 struct WebPluginInfo;
33 namespace ppapi {
34 class PluginInstance;
35 }
36 }
37
38 namespace WebKit {
39 struct WebCompositionUnderline;
40 struct WebPluginParams;
41 class WebPlugin;
42 }
43
44 namespace content {
45
46 class RenderViewPepperHelper {
47 public:
48 RenderViewPepperHelper() {}
49 virtual ~RenderViewPepperHelper();
50
51 virtual WebKit::WebPlugin* CreatePepperWebPlugin(
52 const webkit::WebPluginInfo& webplugin_info,
53 const WebKit::WebPluginParams& params);
54
55 // Called by RenderView to implement the corresponding function in its base
56 // class RenderWidget (see that for more).
57 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint(
58 const gfx::Rect& paint_bounds,
59 TransportDIB** dib,
60 gfx::Rect* location,
61 gfx::Rect* clip,
62 float* scale_factor);
63
64 // Called by RenderView to tell us about painting events, these two functions
65 // just correspond to the WillInitiatePaint, DidInitiatePaint and
66 // DidFlushPaint hooks in RenderView.
67 virtual void ViewWillInitiatePaint() {}
68 virtual void ViewInitiatedPaint() {}
69 virtual void ViewFlushedPaint() {}
70
71 // Called by RenderView when ViewMsg_AsyncOpenFile_ACK.
72 virtual void OnAsyncFileOpened(base::PlatformFileError error_code,
73 base::PlatformFile file,
74 int message_id) {}
75
76 // Called by RenderView when ViewMsg_PpapiBrokerChannelCreated.
77 virtual void OnPpapiBrokerChannelCreated(int request_id,
78 const IPC::ChannelHandle& handle) {}
79
80 // Called when we know whether permission to access the PPAPI broker was
81 // granted.
82 virtual void OnPpapiBrokerPermissionResult(int request_id, bool result) {}
83
84 // Notification that the render view has been focused or defocused. This
85 // notifies all of the plugins.
86 virtual void OnSetFocus(bool has_focus) {}
87
88 // Notification that the page visibility has changed. The default is visible.
89 virtual void PageVisibilityChanged(bool is_visible) {}
90
91 // IME status.
92 virtual bool IsPluginFocused() const;
93 virtual gfx::Rect GetCaretBounds() const;
94 virtual ui::TextInputType GetTextInputType() const;
95 virtual bool IsPluginAcceptingCompositionEvents() const;
96 virtual bool CanComposeInline() const;
97 virtual void GetSurroundingText(string16* text, ui::Range* range) const {}
98
99 // IME events.
100 virtual void OnImeSetComposition(
101 const string16& text,
102 const std::vector<WebKit::WebCompositionUnderline>& underlines,
103 int selection_start,
104 int selection_end) {}
105 virtual void OnImeConfirmComposition(const string16& text) {}
106
107 // Notification that a mouse event has arrived at the render view.
108 virtual void WillHandleMouseEvent() {}
109
110 private:
111 DISALLOW_COPY_AND_ASSIGN(RenderViewPepperHelper);
112 };
113
114 } // namespace content
115
116 #endif // CONTENT_RENDERER_RENDER_VIEW_PEPPER_HELPER_H
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_view_pepper_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698