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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | 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 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 virtual scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock) 96 virtual scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock)
97 OVERRIDE { 97 OVERRIDE {
98 gfx::Size desired_size = window()->bounds().size(); 98 gfx::Size desired_size = window()->bounds().size();
99 return scoped_ptr<ResizeLock>( 99 return scoped_ptr<ResizeLock>(
100 new FakeResizeLock(desired_size, defer_compositor_lock)); 100 new FakeResizeLock(desired_size, defer_compositor_lock));
101 } 101 }
102 102
103 void RunOnCompositingDidCommit() { 103 void RunOnCompositingDidCommit() {
104 OnCompositingDidCommit(window()->GetRootWindow()->compositor()); 104 OnCompositingDidCommit(window()->GetDispatcher()->compositor());
105 } 105 }
106 106
107 // A lock that doesn't actually do anything to the compositor, and does not 107 // A lock that doesn't actually do anything to the compositor, and does not
108 // time out. 108 // time out.
109 class FakeResizeLock : public ResizeLock { 109 class FakeResizeLock : public ResizeLock {
110 public: 110 public:
111 FakeResizeLock(const gfx::Size new_size, bool defer_compositor_lock) 111 FakeResizeLock(const gfx::Size new_size, bool defer_compositor_lock)
112 : ResizeLock(new_size, defer_compositor_lock) {} 112 : ResizeLock(new_size, defer_compositor_lock) {}
113 }; 113 };
114 114
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 EXPECT_CALL(observer, OnWindowPaintScheduled(view_->window_, view_rect)); 901 EXPECT_CALL(observer, OnWindowPaintScheduled(view_->window_, view_rect));
902 view_->OnSwapCompositorFrame( 902 view_->OnSwapCompositorFrame(
903 3, MakeDelegatedFrame(1.f, frame_size, view_rect)); 903 3, MakeDelegatedFrame(1.f, frame_size, view_rect));
904 testing::Mock::VerifyAndClearExpectations(&observer); 904 testing::Mock::VerifyAndClearExpectations(&observer);
905 view_->RunOnCompositingDidCommit(); 905 view_->RunOnCompositingDidCommit();
906 906
907 view_->window_->RemoveObserver(&observer); 907 view_->window_->RemoveObserver(&observer);
908 } 908 }
909 909
910 } // namespace content 910 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698