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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: temp dependencies Created 8 years, 1 month 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
OLDNEW
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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 namespace WebKit { 67 namespace WebKit {
68 class WebInputEvent; 68 class WebInputEvent;
69 class WebMouseEvent; 69 class WebMouseEvent;
70 class WebPluginContainer; 70 class WebPluginContainer;
71 struct WebCompositionUnderline; 71 struct WebCompositionUnderline;
72 struct WebCursorInfo; 72 struct WebCursorInfo;
73 struct WebPrintParams; 73 struct WebPrintParams;
74 } 74 }
75 75
76 namespace content {
77 class PepperGraphics2DHost;
78 }
79
76 namespace media { 80 namespace media {
77 class AudioDecoderConfig; 81 class AudioDecoderConfig;
78 class DecoderBuffer; 82 class DecoderBuffer;
79 class DecryptorClient; 83 class DecryptorClient;
80 class VideoDecoderConfig; 84 class VideoDecoderConfig;
81 } 85 }
82 86
83 namespace ppapi { 87 namespace ppapi {
84 struct InputEventData; 88 struct InputEventData;
85 struct PPP_Instance_Combined; 89 struct PPP_Instance_Combined;
86 class Resource; 90 class Resource;
87 struct URLRequestInfoData; 91 struct URLRequestInfoData;
88 } 92 }
89 93
90 namespace ui { 94 namespace ui {
91 class Range; 95 class Range;
92 } 96 }
93 97
94 namespace webkit { 98 namespace webkit {
95 namespace ppapi { 99 namespace ppapi {
96 100
97 class FullscreenContainer; 101 class FullscreenContainer;
98 class MessageChannel; 102 class MessageChannel;
99 class PluginDelegate; 103 class PluginDelegate;
100 class PluginModule; 104 class PluginModule;
101 class PluginObject; 105 class PluginObject;
102 class PPB_Graphics2D_Impl;
103 class PPB_Graphics3D_Impl; 106 class PPB_Graphics3D_Impl;
104 class PPB_ImageData_Impl; 107 class PPB_ImageData_Impl;
105 class PPB_URLLoader_Impl; 108 class PPB_URLLoader_Impl;
106 109
107 // Represents one time a plugin appears on one web page. 110 // Represents one time a plugin appears on one web page.
108 // 111 //
109 // Note: to get from a PP_Instance to a PluginInstance*, use the 112 // Note: to get from a PP_Instance to a PluginInstance*, use the
110 // ResourceTracker. 113 // ResourceTracker.
111 class WEBKIT_PLUGINS_EXPORT PluginInstance : 114 class WEBKIT_PLUGINS_EXPORT PluginInstance :
112 public base::RefCounted<PluginInstance>, 115 public base::RefCounted<PluginInstance>,
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 void ReportGeometry(); 557 void ReportGeometry();
555 558
556 // Queries the plugin for supported print formats and sets |format| to the 559 // Queries the plugin for supported print formats and sets |format| to the
557 // best format to use. Returns false if the plugin does not support any 560 // best format to use. Returns false if the plugin does not support any
558 // print format that we can handle (we can handle only PDF). 561 // print format that we can handle (we can handle only PDF).
559 bool GetPreferredPrintOutputFormat(PP_PrintOutputFormat_Dev* format); 562 bool GetPreferredPrintOutputFormat(PP_PrintOutputFormat_Dev* format);
560 bool PrintPDFOutput(PP_Resource print_output, WebKit::WebCanvas* canvas); 563 bool PrintPDFOutput(PP_Resource print_output, WebKit::WebCanvas* canvas);
561 564
562 // Get the bound graphics context as a concrete 2D graphics context or returns 565 // Get the bound graphics context as a concrete 2D graphics context or returns
563 // null if the context is not 2D. 566 // null if the context is not 2D.
564 PPB_Graphics2D_Impl* GetBoundGraphics2D() const; 567 PluginDelegate::PlatformGraphics2D* GetBoundGraphics2D() const;
565 568
566 // Get the bound 3D graphics context. 569 // Get the bound 3D graphics context.
567 // Returns NULL if bound graphics is not a 3D context. 570 // Returns NULL if bound graphics is not a 3D context.
568 PPB_Graphics3D_Impl* GetBoundGraphics3D() const; 571 PPB_Graphics3D_Impl* GetBoundGraphics3D() const;
569 572
570 // Sets the id of the texture that the plugin draws to. The id is in the 573 // Sets the id of the texture that the plugin draws to. The id is in the
571 // compositor space so it can use it to composite with rest of the page. 574 // compositor space so it can use it to composite with rest of the page.
572 // A value of zero indicates the plugin is not backed by a texture. 575 // A value of zero indicates the plugin is not backed by a texture.
573 // is_opaque is true if the plugin contents are always opaque. 576 // is_opaque is true if the plugin contents are always opaque.
574 void setBackingTextureId(unsigned int id, bool is_opaque); 577 void setBackingTextureId(unsigned int id, bool is_opaque);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 // same as the default values. 640 // same as the default values.
638 bool sent_initial_did_change_view_; 641 bool sent_initial_did_change_view_;
639 642
640 // We use a weak ptr factory for scheduling DidChangeView events so that we 643 // We use a weak ptr factory for scheduling DidChangeView events so that we
641 // can tell whether updates are pending and consolidate them. When there's 644 // can tell whether updates are pending and consolidate them. When there's
642 // already a weak ptr pending (HasWeakPtrs is true), code should update the 645 // already a weak ptr pending (HasWeakPtrs is true), code should update the
643 // view_data_ but not send updates. This also allows us to cancel scheduled 646 // view_data_ but not send updates. This also allows us to cancel scheduled
644 // view change events. 647 // view change events.
645 base::WeakPtrFactory<PluginInstance> view_change_weak_ptr_factory_; 648 base::WeakPtrFactory<PluginInstance> view_change_weak_ptr_factory_;
646 649
647 // The current device context for painting in 2D or 3D. 650 // The current device context for painting in 2D and 3D.
648 scoped_refptr< ::ppapi::Resource> bound_graphics_; 651 scoped_refptr< ::ppapi::Resource> bound_graphics_3d_;
652 PluginDelegate::PlatformGraphics2D* bound_graphics_2d_platform_;
649 653
650 // We track two types of focus, one from WebKit, which is the focus among 654 // We track two types of focus, one from WebKit, which is the focus among
651 // all elements of the page, one one from the browser, which is whether the 655 // all elements of the page, one one from the browser, which is whether the
652 // tab/window has focus. We tell the plugin it has focus only when both of 656 // tab/window has focus. We tell the plugin it has focus only when both of
653 // these values are set to true. 657 // these values are set to true.
654 bool has_webkit_focus_; 658 bool has_webkit_focus_;
655 bool has_content_area_focus_; 659 bool has_content_area_focus_;
656 660
657 // The id of the current find operation, or -1 if none is in process. 661 // The id of the current find operation, or -1 if none is in process.
658 int find_identifier_; 662 int find_identifier_;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 uint32_t pending_video_decode_request_id_; 826 uint32_t pending_video_decode_request_id_;
823 media::Decryptor::VideoDecodeCB pending_video_decode_cb_; 827 media::Decryptor::VideoDecodeCB pending_video_decode_cb_;
824 828
825 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 829 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
826 }; 830 };
827 831
828 } // namespace ppapi 832 } // namespace ppapi
829 } // namespace webkit 833 } // namespace webkit
830 834
831 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 835 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698