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

Side by Side Diff: content/browser/renderer_host/browser_compositor_view_mac.mm

Issue 2779753008: Make CompositorObserver’s destructor protected-and-virtual.
Patch Set: Rebase on top of recent master to remove unwanted changes. Created 3 years, 8 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
« no previous file with comments | « no previous file | ui/compositor/compositor_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/browser/renderer_host/browser_compositor_view_mac.h" 5 #include "content/browser/renderer_host/browser_compositor_view_mac.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 //////////////////////////////////////////////////////////////////////////////// 50 ////////////////////////////////////////////////////////////////////////////////
51 // RecyclableCompositorMac 51 // RecyclableCompositorMac
52 52
53 // A ui::Compositor and a gfx::AcceleratedWidget (and helper) that it draws 53 // A ui::Compositor and a gfx::AcceleratedWidget (and helper) that it draws
54 // into. This structure is used to efficiently recycle these structures across 54 // into. This structure is used to efficiently recycle these structures across
55 // tabs (because creating a new ui::Compositor for each tab would be expensive 55 // tabs (because creating a new ui::Compositor for each tab would be expensive
56 // in terms of time and resources). 56 // in terms of time and resources).
57 class RecyclableCompositorMac : public ui::CompositorObserver { 57 class RecyclableCompositorMac : public ui::CompositorObserver {
58 public: 58 public:
59 virtual ~RecyclableCompositorMac(); 59 ~RecyclableCompositorMac() override;
60 60
61 // Create a compositor, or recycle a preexisting one. 61 // Create a compositor, or recycle a preexisting one.
62 static std::unique_ptr<RecyclableCompositorMac> Create(); 62 static std::unique_ptr<RecyclableCompositorMac> Create();
63 63
64 // Delete a compositor, or allow it to be recycled. 64 // Delete a compositor, or allow it to be recycled.
65 static void Recycle(std::unique_ptr<RecyclableCompositorMac> compositor); 65 static void Recycle(std::unique_ptr<RecyclableCompositorMac> compositor);
66 66
67 // Indicate that the recyclable compositor should be destroyed, and no future 67 // Indicate that the recyclable compositor should be destroyed, and no future
68 // compositors should be recycled. 68 // compositors should be recycled.
69 static void DisableRecyclingForShutdown(); 69 static void DisableRecyclingForShutdown();
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 void BrowserCompositorMac::OnBeginFrame(const cc::BeginFrameArgs& args) { 446 void BrowserCompositorMac::OnBeginFrame(const cc::BeginFrameArgs& args) {
447 client_->BrowserCompositorMacSendBeginFrame(args); 447 client_->BrowserCompositorMacSendBeginFrame(args);
448 } 448 }
449 449
450 bool BrowserCompositorMac::IsAutoResizeEnabled() const { 450 bool BrowserCompositorMac::IsAutoResizeEnabled() const {
451 NOTREACHED(); 451 NOTREACHED();
452 return false; 452 return false;
453 } 453 }
454 454
455 } // namespace content 455 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698