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

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

Issue 131443007: aura: Remove old GL paths from RenderWidgetHostViewAura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moreflags 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 #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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 class FakeRenderWidgetHostViewAura : public RenderWidgetHostViewAura { 116 class FakeRenderWidgetHostViewAura : public RenderWidgetHostViewAura {
117 public: 117 public:
118 FakeRenderWidgetHostViewAura(RenderWidgetHost* widget) 118 FakeRenderWidgetHostViewAura(RenderWidgetHost* widget)
119 : RenderWidgetHostViewAura(widget), has_resize_lock_(false) {} 119 : RenderWidgetHostViewAura(widget), has_resize_lock_(false) {}
120 120
121 virtual ~FakeRenderWidgetHostViewAura() {} 121 virtual ~FakeRenderWidgetHostViewAura() {}
122 122
123 virtual bool ShouldCreateResizeLock() OVERRIDE { 123 virtual bool ShouldCreateResizeLock() OVERRIDE {
124 gfx::Size desired_size = window()->bounds().size(); 124 gfx::Size desired_size = window()->bounds().size();
125 return desired_size != current_frame_size(); 125 return desired_size != current_frame_size_in_dip();
126 } 126 }
127 127
128 virtual scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock) 128 virtual scoped_ptr<ResizeLock> CreateResizeLock(bool defer_compositor_lock)
129 OVERRIDE { 129 OVERRIDE {
130 gfx::Size desired_size = window()->bounds().size(); 130 gfx::Size desired_size = window()->bounds().size();
131 return scoped_ptr<ResizeLock>( 131 return scoped_ptr<ResizeLock>(
132 new FakeResizeLock(desired_size, defer_compositor_lock)); 132 new FakeResizeLock(desired_size, defer_compositor_lock));
133 } 133 }
134 134
135 void RunOnCompositingDidCommit() { 135 void RunOnCompositingDidCommit() {
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 view_->OnSwapCompositorFrame( 1212 view_->OnSwapCompositorFrame(
1213 1, MakeDelegatedFrame(2.f, frame_size, gfx::Rect(frame_size))); 1213 1, MakeDelegatedFrame(2.f, frame_size, gfx::Rect(frame_size)));
1214 1214
1215 // When we get a new frame with the same frame size in physical pixels, but a 1215 // When we get a new frame with the same frame size in physical pixels, but a
1216 // different scale, we should generate a new frame provider, as the final 1216 // different scale, we should generate a new frame provider, as the final
1217 // result will need to be scaled differently to the screen. 1217 // result will need to be scaled differently to the screen.
1218 EXPECT_NE(frame_provider.get(), view_->frame_provider_.get()); 1218 EXPECT_NE(frame_provider.get(), view_->frame_provider_.get());
1219 } 1219 }
1220 1220
1221 } // namespace content 1221 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698