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

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

Issue 12328080: Plumb physical backing size from RWHV to renderer CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fetch device scale directly in RWVHBase Created 7 years, 9 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 #include "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 return is_layer_attached_ && content_view_core_; 270 return is_layer_attached_ && content_view_core_;
271 } 271 }
272 272
273 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { 273 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
274 if (!content_view_core_) 274 if (!content_view_core_)
275 return gfx::Rect(); 275 return gfx::Rect();
276 276
277 return gfx::Rect(content_view_core_->GetDIPSize()); 277 return gfx::Rect(content_view_core_->GetDIPSize());
278 } 278 }
279 279
280 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
281 if (!content_view_core_)
282 return gfx::Size();
283
284 return content_view_core_->GetPhysicalSize();
285 }
286
280 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { 287 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
281 // There are no cursors on Android. 288 // There are no cursors on Android.
282 } 289 }
283 290
284 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { 291 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) {
285 // Do nothing. The UI notification is handled through ContentViewClient which 292 // Do nothing. The UI notification is handled through ContentViewClient which
286 // is TabContentsDelegate. 293 // is TabContentsDelegate.
287 } 294 }
288 295
289 void RenderWidgetHostViewAndroid::TextInputStateChanged( 296 void RenderWidgetHostViewAndroid::TextInputStateChanged(
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 // RenderWidgetHostView, public: 694 // RenderWidgetHostView, public:
688 695
689 // static 696 // static
690 RenderWidgetHostView* 697 RenderWidgetHostView*
691 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 698 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
692 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 699 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
693 return new RenderWidgetHostViewAndroid(rwhi, NULL); 700 return new RenderWidgetHostViewAndroid(rwhi, NULL);
694 } 701 }
695 702
696 } // namespace content 703 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698