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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 const_cast<RenderWidgetHostViewAndroid*>(this)); | 188 const_cast<RenderWidgetHostViewAndroid*>(this)); |
189 } | 189 } |
190 | 190 |
191 gfx::NativeViewAccessible | 191 gfx::NativeViewAccessible |
192 RenderWidgetHostViewAndroid::GetNativeViewAccessible() { | 192 RenderWidgetHostViewAndroid::GetNativeViewAccessible() { |
193 NOTIMPLEMENTED(); | 193 NOTIMPLEMENTED(); |
194 return NULL; | 194 return NULL; |
195 } | 195 } |
196 | 196 |
197 void RenderWidgetHostViewAndroid::MovePluginWindows( | 197 void RenderWidgetHostViewAndroid::MovePluginWindows( |
198 const gfx::Point& scroll_offset, | 198 const gfx::Vector2d& scroll_offset, |
199 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { | 199 const std::vector<webkit::npapi::WebPluginGeometry>& moves) { |
200 // We don't have plugin windows on Android. Do nothing. Note: this is called | 200 // We don't have plugin windows on Android. Do nothing. Note: this is called |
201 // from RenderWidgetHost::OnMsgUpdateRect which is itself invoked while | 201 // from RenderWidgetHost::OnMsgUpdateRect which is itself invoked while |
202 // processing the corresponding message from Renderer. | 202 // processing the corresponding message from Renderer. |
203 } | 203 } |
204 | 204 |
205 void RenderWidgetHostViewAndroid::Focus() { | 205 void RenderWidgetHostViewAndroid::Focus() { |
206 host_->Focus(); | 206 host_->Focus(); |
207 host_->SetInputMethodActive(true); | 207 host_->SetInputMethodActive(true); |
208 } | 208 } |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 } | 511 } |
512 | 512 |
513 void RenderWidgetHostViewAndroid::SetCachedPageScaleFactorLimits( | 513 void RenderWidgetHostViewAndroid::SetCachedPageScaleFactorLimits( |
514 float minimum_scale, | 514 float minimum_scale, |
515 float maximum_scale) { | 515 float maximum_scale) { |
516 if (content_view_core_) | 516 if (content_view_core_) |
517 content_view_core_->UpdatePageScaleLimits(minimum_scale, maximum_scale); | 517 content_view_core_->UpdatePageScaleLimits(minimum_scale, maximum_scale); |
518 } | 518 } |
519 | 519 |
520 void RenderWidgetHostViewAndroid::UpdateFrameInfo( | 520 void RenderWidgetHostViewAndroid::UpdateFrameInfo( |
521 const gfx::Point& scroll_offset, | 521 const gfx::Vector2d& scroll_offset, |
522 float page_scale_factor, | 522 float page_scale_factor, |
523 const gfx::Size& content_size) { | 523 const gfx::Size& content_size) { |
524 if (content_view_core_) { | 524 if (content_view_core_) { |
525 content_view_core_->UpdateContentSize(content_size.width(), | 525 content_view_core_->UpdateContentSize(content_size.width(), |
526 content_size.height()); | 526 content_size.height()); |
527 content_view_core_->UpdateScrollOffsetAndPageScaleFactor(scroll_offset.x(), | 527 content_view_core_->UpdateScrollOffsetAndPageScaleFactor(scroll_offset.x(), |
528 scroll_offset.y(), | 528 scroll_offset.y(), |
529 page_scale_factor); | 529 page_scale_factor); |
530 } | 530 } |
531 } | 531 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 // RenderWidgetHostView, public: | 566 // RenderWidgetHostView, public: |
567 | 567 |
568 // static | 568 // static |
569 RenderWidgetHostView* | 569 RenderWidgetHostView* |
570 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 570 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
571 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 571 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
572 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 572 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
573 } | 573 } |
574 | 574 |
575 } // namespace content | 575 } // namespace content |
OLD | NEW |