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

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

Issue 16119003: Move SynchronousCompositor into content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 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_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 namespace ppapi { 70 namespace ppapi {
71 class PluginInstance; 71 class PluginInstance;
72 } // namespace ppapi 72 } // namespace ppapi
73 } // namespace webkit 73 } // namespace webkit
74 74
75 namespace content { 75 namespace content {
76 struct GpuRenderingStats; 76 struct GpuRenderingStats;
77 class RenderWidgetCompositor; 77 class RenderWidgetCompositor;
78 class RenderWidgetTest; 78 class RenderWidgetTest;
79 class SynchronousCompositorImpl;
80 79
81 // RenderWidget provides a communication bridge between a WebWidget and 80 // RenderWidget provides a communication bridge between a WebWidget and
82 // a RenderWidgetHost, the latter of which lives in a different process. 81 // a RenderWidgetHost, the latter of which lives in a different process.
83 class CONTENT_EXPORT RenderWidget 82 class CONTENT_EXPORT RenderWidget
84 : public IPC::Listener, 83 : public IPC::Listener,
85 public IPC::Sender, 84 public IPC::Sender,
86 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), 85 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient),
87 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), 86 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient),
88 public base::RefCounted<RenderWidget> { 87 public base::RefCounted<RenderWidget> {
89 public: 88 public:
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 // at the given point. 495 // at the given point.
497 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; 496 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const;
498 497
499 // Check whether the WebWidget has any touch event handlers registered. 498 // Check whether the WebWidget has any touch event handlers registered.
500 virtual void hasTouchEventHandlers(bool has_handlers); 499 virtual void hasTouchEventHandlers(bool has_handlers);
501 500
502 // Creates a 3D context associated with this view. 501 // Creates a 3D context associated with this view.
503 WebGraphicsContext3DCommandBufferImpl* CreateGraphicsContext3D( 502 WebGraphicsContext3DCommandBufferImpl* CreateGraphicsContext3D(
504 const WebKit::WebGraphicsContext3D::Attributes& attributes); 503 const WebKit::WebGraphicsContext3D::Attributes& attributes);
505 504
506 // Lazily creates the synchronous compositor on first call.
507 SynchronousCompositorImpl* GetSynchronousCompositor();
508
509 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); 505 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap);
510 506
511 // Routing ID that allows us to communicate to the parent browser process 507 // Routing ID that allows us to communicate to the parent browser process
512 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. 508 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
513 int32 routing_id_; 509 int32 routing_id_;
514 510
515 int32 surface_id_; 511 int32 surface_id_;
516 512
517 // We are responsible for destroying this object via its Close method. 513 // We are responsible for destroying this object via its Close method.
518 WebKit::WebWidget* webwidget_; 514 WebKit::WebWidget* webwidget_;
519 515
520 // This is lazily constructed and must not outlive webwidget_. 516 // This is lazily constructed and must not outlive webwidget_.
521 scoped_ptr<RenderWidgetCompositor> compositor_; 517 scoped_ptr<RenderWidgetCompositor> compositor_;
522 518
523 #if defined(OS_ANDROID) 519 // Set to the ID of the view that initiated creating this view, if any. When
524 // This is lazily constructed.
525 scoped_ptr<SynchronousCompositorImpl> synchronous_compositor_;
526 #endif
527
528 // Set to the ID of the view that initiated creating this view, if any. When
529 // the view was initiated by the browser (the common case), this will be 520 // the view was initiated by the browser (the common case), this will be
530 // MSG_ROUTING_NONE. This is used in determining ownership when opening 521 // MSG_ROUTING_NONE. This is used in determining ownership when opening
531 // child tabs. See RenderWidget::createWebViewWithRequest. 522 // child tabs. See RenderWidget::createWebViewWithRequest.
532 // 523 //
533 // This ID may refer to an invalid view if that view is closed before this 524 // This ID may refer to an invalid view if that view is closed before this
534 // view is. 525 // view is.
535 int32 opener_id_; 526 int32 opener_id_;
536 527
537 // The position where this view should be initially shown. 528 // The position where this view should be initially shown.
538 gfx::Rect initial_pos_; 529 gfx::Rect initial_pos_;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 bool overscroll_notifications_enabled_; 716 bool overscroll_notifications_enabled_;
726 717
727 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; 718 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
728 719
729 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 720 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
730 }; 721 };
731 722
732 } // namespace content 723 } // namespace content
733 724
734 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 725 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698