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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 cached_background_color_ = color; | 392 cached_background_color_ = color; |
393 if (content_view_core_) | 393 if (content_view_core_) |
394 content_view_core_->OnBackgroundColorChanged(color); | 394 content_view_core_->OnBackgroundColorChanged(color); |
395 } | 395 } |
396 | 396 |
397 void RenderWidgetHostViewAndroid::SendVSync(base::TimeTicks frame_time) { | 397 void RenderWidgetHostViewAndroid::SendVSync(base::TimeTicks frame_time) { |
398 host_->Send(new ViewMsg_DidVSync(host_->GetRoutingID(), frame_time)); | 398 host_->Send(new ViewMsg_DidVSync(host_->GetRoutingID(), frame_time)); |
399 } | 399 } |
400 | 400 |
401 void RenderWidgetHostViewAndroid::OnSetVSyncNotificationEnabled(bool enabled) { | 401 void RenderWidgetHostViewAndroid::OnSetVSyncNotificationEnabled(bool enabled) { |
402 // TODO(skyostil): Toggle the Java-side vsync monitor. | 402 if (content_view_core_) |
| 403 content_view_core_->SetVSyncNotificationEnabled(enabled); |
403 } | 404 } |
404 | 405 |
405 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 406 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
406 const GURL& content_url) { | 407 const GURL& content_url) { |
407 if (content_view_core_) | 408 if (content_view_core_) |
408 content_view_core_->StartContentIntent(content_url); | 409 content_view_core_->StartContentIntent(content_url); |
409 } | 410 } |
410 | 411 |
411 void RenderWidgetHostViewAndroid::ImeCancelComposition() { | 412 void RenderWidgetHostViewAndroid::ImeCancelComposition() { |
412 ime_adapter_android_.CancelComposition(); | 413 ime_adapter_android_.CancelComposition(); |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 // RenderWidgetHostView, public: | 840 // RenderWidgetHostView, public: |
840 | 841 |
841 // static | 842 // static |
842 RenderWidgetHostView* | 843 RenderWidgetHostView* |
843 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 844 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
844 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 845 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
845 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 846 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
846 } | 847 } |
847 | 848 |
848 } // namespace content | 849 } // namespace content |
OLD | NEW |