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

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

Issue 1245863003: Initialize CompositorDependencies in RenderWidget's constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 // without ref-counting is an error. 350 // without ref-counting is an error.
351 friend class base::RefCounted<RenderWidget>; 351 friend class base::RefCounted<RenderWidget>;
352 // For unit tests. 352 // For unit tests.
353 friend class RenderWidgetTest; 353 friend class RenderWidgetTest;
354 354
355 enum ResizeAck { 355 enum ResizeAck {
356 SEND_RESIZE_ACK, 356 SEND_RESIZE_ACK,
357 NO_RESIZE_ACK, 357 NO_RESIZE_ACK,
358 }; 358 };
359 359
360 RenderWidget(blink::WebPopupType popup_type, 360 RenderWidget(CompositorDependencies* compositor_deps,
361 blink::WebPopupType popup_type,
361 const blink::WebScreenInfo& screen_info, 362 const blink::WebScreenInfo& screen_info,
362 bool swapped_out, 363 bool swapped_out,
363 bool hidden, 364 bool hidden,
364 bool never_visible); 365 bool never_visible);
365 366
366 ~RenderWidget() override; 367 ~RenderWidget() override;
367 368
368 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget, 369 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget,
369 blink::WebLocalFrame* frame); 370 blink::WebLocalFrame* frame);
370 371
371 // Creates a WebWidget based on the popup type. 372 // Creates a WebWidget based on the popup type.
372 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); 373 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget);
373 374
374 // Initializes this view with the given opener. CompleteInit must be called 375 // Initializes this view with the given opener. CompleteInit must be called
375 // later. 376 // later.
376 bool Init(int32 opener_id, CompositorDependencies* compositor_deps); 377 bool Init(int32 opener_id);
377 378
378 // Called by Init and subclasses to perform initialization. 379 // Called by Init and subclasses to perform initialization.
379 bool DoInit(int32 opener_id, 380 bool DoInit(int32 opener_id,
380 CompositorDependencies* compositor_deps,
381 blink::WebWidget* web_widget, 381 blink::WebWidget* web_widget,
382 IPC::SyncMessage* create_widget_message); 382 IPC::SyncMessage* create_widget_message);
383 383
384 // Finishes creation of a pending view started with Init. 384 // Finishes creation of a pending view started with Init.
385 void CompleteInit(); 385 void CompleteInit();
386 386
387 // Sets whether this RenderWidget has been swapped out to be displayed by 387 // Sets whether this RenderWidget has been swapped out to be displayed by
388 // a RenderWidget in a different process. If so, no new IPC messages will be 388 // a RenderWidget in a different process. If so, no new IPC messages will be
389 // sent (only ACKs) and the process is free to exit when there are no other 389 // sent (only ACKs) and the process is free to exit when there are no other
390 // active RenderWidgets. 390 // active RenderWidgets.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D(); 596 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D();
597 597
598 // Routing ID that allows us to communicate to the parent browser process 598 // Routing ID that allows us to communicate to the parent browser process
599 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. 599 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
600 int32 routing_id_; 600 int32 routing_id_;
601 601
602 int32 surface_id_; 602 int32 surface_id_;
603 603
604 // Dependencies for initializing a compositor, including flags for optional 604 // Dependencies for initializing a compositor, including flags for optional
605 // features. 605 // features.
606 CompositorDependencies* compositor_deps_; 606 CompositorDependencies* const compositor_deps_;
607 607
608 // We are responsible for destroying this object via its Close method. 608 // We are responsible for destroying this object via its Close method.
609 // May be NULL when the window is closing. 609 // May be NULL when the window is closing.
610 blink::WebWidget* webwidget_; 610 blink::WebWidget* webwidget_;
611 611
612 // This is lazily constructed and must not outlive webwidget_. 612 // This is lazily constructed and must not outlive webwidget_.
613 scoped_ptr<RenderWidgetCompositor> compositor_; 613 scoped_ptr<RenderWidgetCompositor> compositor_;
614 614
615 // Set to the ID of the view that initiated creating this view, if any. When 615 // Set to the ID of the view that initiated creating this view, if any. When
616 // the view was initiated by the browser (the common case), this will be 616 // the view was initiated by the browser (the common case), this will be
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 ui::MenuSourceType context_menu_source_type_; 825 ui::MenuSourceType context_menu_source_type_;
826 bool has_host_context_menu_location_; 826 bool has_host_context_menu_location_;
827 gfx::Point host_context_menu_location_; 827 gfx::Point host_context_menu_location_;
828 828
829 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 829 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
830 }; 830 };
831 831
832 } // namespace content 832 } // namespace content
833 833
834 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 834 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698