OLD | NEW |
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 return is_layer_attached_ && content_view_core_; | 273 return is_layer_attached_ && content_view_core_; |
274 } | 274 } |
275 | 275 |
276 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { | 276 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { |
277 if (!content_view_core_) | 277 if (!content_view_core_) |
278 return gfx::Rect(); | 278 return gfx::Rect(); |
279 | 279 |
280 return gfx::Rect(content_view_core_->GetViewportSizeDip()); | 280 return gfx::Rect(content_view_core_->GetViewportSizeDip()); |
281 } | 281 } |
282 | 282 |
| 283 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
| 284 if (!content_view_core_) |
| 285 return gfx::Size(); |
| 286 |
| 287 return content_view_core_->GetViewportSizePix(); |
| 288 } |
| 289 |
283 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { | 290 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { |
284 // There are no cursors on Android. | 291 // There are no cursors on Android. |
285 } | 292 } |
286 | 293 |
287 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { | 294 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { |
288 // Do nothing. The UI notification is handled through ContentViewClient which | 295 // Do nothing. The UI notification is handled through ContentViewClient which |
289 // is TabContentsDelegate. | 296 // is TabContentsDelegate. |
290 } | 297 } |
291 | 298 |
292 void RenderWidgetHostViewAndroid::TextInputStateChanged( | 299 void RenderWidgetHostViewAndroid::TextInputStateChanged( |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 // RenderWidgetHostView, public: | 681 // RenderWidgetHostView, public: |
675 | 682 |
676 // static | 683 // static |
677 RenderWidgetHostView* | 684 RenderWidgetHostView* |
678 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 685 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
679 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 686 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
680 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 687 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
681 } | 688 } |
682 | 689 |
683 } // namespace content | 690 } // namespace content |
OLD | NEW |