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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 120913004: aura: Ensure OwnedMailbox not used with invalid or destroyed GLHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ownedmailbox: expectfalse Created 6 years, 11 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
14 #include "base/memory/linked_ptr.h" 15 #include "base/memory/linked_ptr.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
18 #include "cc/layers/delegated_frame_provider.h" 19 #include "cc/layers/delegated_frame_provider.h"
(...skipping 22 matching lines...) Expand all
41 #include "webkit/common/cursors/webcursor.h" 42 #include "webkit/common/cursors/webcursor.h"
42 43
43 namespace aura { 44 namespace aura {
44 class WindowTracker; 45 class WindowTracker;
45 namespace client { 46 namespace client {
46 class ScopedTooltipDisabler; 47 class ScopedTooltipDisabler;
47 } 48 }
48 } 49 }
49 50
50 namespace cc { 51 namespace cc {
52 class CopyOutputRequest;
51 class CopyOutputResult; 53 class CopyOutputResult;
52 class DelegatedFrameData; 54 class DelegatedFrameData;
53 } 55 }
54 56
55 namespace gfx { 57 namespace gfx {
56 class Canvas; 58 class Canvas;
57 class Display; 59 class Display;
58 } 60 }
59 61
60 namespace ui { 62 namespace ui {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Should be constructed via RenderWidgetHostView::CreateViewForWidget. 366 // Should be constructed via RenderWidgetHostView::CreateViewForWidget.
365 explicit RenderWidgetHostViewAura(RenderWidgetHost* host); 367 explicit RenderWidgetHostViewAura(RenderWidgetHost* host);
366 368
367 RenderWidgetHostViewFrameSubscriber* frame_subscriber() const { 369 RenderWidgetHostViewFrameSubscriber* frame_subscriber() const {
368 return frame_subscriber_.get(); 370 return frame_subscriber_.get();
369 } 371 }
370 372
371 virtual bool ShouldCreateResizeLock(); 373 virtual bool ShouldCreateResizeLock();
372 virtual scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock); 374 virtual scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock);
373 375
376 virtual void RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request);
377
374 // Exposed for tests. 378 // Exposed for tests.
375 aura::Window* window() { return window_; } 379 aura::Window* window() { return window_; }
376 gfx::Size current_frame_size() const { return current_frame_size_; } 380 gfx::Size current_frame_size() const { return current_frame_size_; }
377 void LockResources(); 381 void LockResources();
378 void UnlockResources(); 382 void UnlockResources();
379 383
380 // Overridden from ui::CompositorObserver: 384 // Overridden from ui::CompositorObserver:
381 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE; 385 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE;
382 virtual void OnCompositingStarted(ui::Compositor* compositor, 386 virtual void OnCompositingStarted(ui::Compositor* compositor,
383 base::TimeTicks start_time) OVERRIDE; 387 base::TimeTicks start_time) OVERRIDE;
(...skipping 13 matching lines...) Expand all
397 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 401 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
398 SkippedDelegatedFrames); 402 SkippedDelegatedFrames);
399 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); 403 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange);
400 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 404 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
401 DiscardDelegatedFrames); 405 DiscardDelegatedFrames);
402 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 406 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
403 DiscardDelegatedFramesWithLocking); 407 DiscardDelegatedFramesWithLocking);
404 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange); 408 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SoftwareDPIChange);
405 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 409 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
406 UpdateCursorIfOverSelf); 410 UpdateCursorIfOverSelf);
411 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraCopyRequestTest,
412 DestroyedAfterCopyRequest);
407 413
408 class WindowObserver; 414 class WindowObserver;
409 friend class WindowObserver; 415 friend class WindowObserver;
410 416
411 // Overridden from ImageTransportFactoryObserver: 417 // Overridden from ImageTransportFactoryObserver:
412 virtual void OnLostResources() OVERRIDE; 418 virtual void OnLostResources() OVERRIDE;
413 419
414 // Overridden from BrowserAccessibilityDelegate: 420 // Overridden from BrowserAccessibilityDelegate:
415 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; 421 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE;
416 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; 422 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 scoped_refptr<OwnedMailbox> subscriber_texture, 505 scoped_refptr<OwnedMailbox> subscriber_texture,
500 scoped_refptr<media::VideoFrame> video_frame, 506 scoped_refptr<media::VideoFrame> video_frame,
501 const base::Callback<void(bool)>& callback, 507 const base::Callback<void(bool)>& callback,
502 scoped_ptr<cc::CopyOutputResult> result); 508 scoped_ptr<cc::CopyOutputResult> result);
503 static void CopyFromCompositingSurfaceFinishedForVideo( 509 static void CopyFromCompositingSurfaceFinishedForVideo(
504 base::WeakPtr<RenderWidgetHostViewAura> rwhva, 510 base::WeakPtr<RenderWidgetHostViewAura> rwhva,
505 const base::Callback<void(bool)>& callback, 511 const base::Callback<void(bool)>& callback,
506 scoped_refptr<OwnedMailbox> subscriber_texture, 512 scoped_refptr<OwnedMailbox> subscriber_texture,
507 scoped_ptr<cc::SingleReleaseCallback> release_callback, 513 scoped_ptr<cc::SingleReleaseCallback> release_callback,
508 bool result); 514 bool result);
515 static void ReturnSubscriberTexture(
516 base::WeakPtr<RenderWidgetHostViewAura> rwhva,
517 scoped_refptr<OwnedMailbox> subscriber_texture,
518 uint32 sync_point);
509 519
510 ui::Compositor* GetCompositor() const; 520 ui::Compositor* GetCompositor() const;
511 521
512 // Detaches |this| from the input method object. 522 // Detaches |this| from the input method object.
513 void DetachFromInputMethod(); 523 void DetachFromInputMethod();
514 524
515 // Dismisses a Web Popup on mouse press outside the popup and its parent. 525 // Dismisses a Web Popup on mouse press outside the popup and its parent.
516 void ApplyEventFilterForPopupExit(ui::MouseEvent* event); 526 void ApplyEventFilterForPopupExit(ui::MouseEvent* event);
517 527
518 // Converts |rect| from window coordinate to screen coordinate. 528 // Converts |rect| from window coordinate to screen coordinate.
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 // over this view changes, we need this information in order to create a new 768 // over this view changes, we need this information in order to create a new
759 // region for the HWND. 769 // region for the HWND.
760 PluginWindowMoves plugin_window_moves_; 770 PluginWindowMoves plugin_window_moves_;
761 #endif 771 #endif
762 772
763 base::TimeTicks last_draw_ended_; 773 base::TimeTicks last_draw_ended_;
764 774
765 // Subscriber that listens to frame presentation events. 775 // Subscriber that listens to frame presentation events.
766 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; 776 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
767 std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_; 777 std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_;
778 std::set<OwnedMailbox*> active_frame_subscriber_textures_;
768 779
769 // YUV readback pipeline. 780 // YUV readback pipeline.
770 scoped_ptr<content::ReadbackYUVInterface> 781 scoped_ptr<content::ReadbackYUVInterface>
771 yuv_readback_pipeline_; 782 yuv_readback_pipeline_;
772 783
773 TouchEditingClient* touch_editing_client_; 784 TouchEditingClient* touch_editing_client_;
774 785
775 std::vector<ui::LatencyInfo> software_latency_info_; 786 std::vector<ui::LatencyInfo> software_latency_info_;
776 787
777 struct ReleasedFrameInfo { 788 struct ReleasedFrameInfo {
(...skipping 14 matching lines...) Expand all
792 // passed to windowless plugins like Flash/Silverlight, etc as the 803 // passed to windowless plugins like Flash/Silverlight, etc as the
793 // container window. 804 // container window.
794 HWND plugin_parent_window_; 805 HWND plugin_parent_window_;
795 #endif 806 #endif
796 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 807 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
797 }; 808 };
798 809
799 } // namespace content 810 } // namespace content
800 811
801 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 812 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/aura/owned_mailbox.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698