| 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/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 void RenderWidgetHostViewAndroid::OnDidChangeBodyBackgroundColor( | 399 void RenderWidgetHostViewAndroid::OnDidChangeBodyBackgroundColor( |
| 400 SkColor color) { | 400 SkColor color) { |
| 401 if (cached_background_color_ == color) | 401 if (cached_background_color_ == color) |
| 402 return; | 402 return; |
| 403 | 403 |
| 404 cached_background_color_ = color; | 404 cached_background_color_ = color; |
| 405 if (content_view_core_) | 405 if (content_view_core_) |
| 406 content_view_core_->OnBackgroundColorChanged(color); | 406 content_view_core_->OnBackgroundColorChanged(color); |
| 407 } | 407 } |
| 408 | 408 |
| 409 void RenderWidgetHostViewAndroid::SendBeginFrame( | 409 void RenderWidgetHostViewAndroid::SendBeginFrame(cc::BeginFrameArgs args) { |
| 410 base::TimeTicks frame_time) { | |
| 411 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::SendBeginFrame"); | 410 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::SendBeginFrame"); |
| 412 if (host_) | 411 if (host_) |
| 413 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), | 412 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args)); |
| 414 frame_time)); | |
| 415 } | 413 } |
| 416 | 414 |
| 417 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( | 415 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( |
| 418 bool enabled) { | 416 bool enabled) { |
| 419 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame", | 417 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame", |
| 420 "enabled", enabled); | 418 "enabled", enabled); |
| 421 if (content_view_core_) | 419 if (content_view_core_) |
| 422 content_view_core_->SetVSyncNotificationEnabled(enabled); | 420 content_view_core_->SetNeedsBeginFrame(enabled); |
| 423 } | 421 } |
| 424 | 422 |
| 425 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 423 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
| 426 const GURL& content_url) { | 424 const GURL& content_url) { |
| 427 if (content_view_core_) | 425 if (content_view_core_) |
| 428 content_view_core_->StartContentIntent(content_url); | 426 content_view_core_->StartContentIntent(content_url); |
| 429 } | 427 } |
| 430 | 428 |
| 431 void RenderWidgetHostViewAndroid::ImeCancelComposition() { | 429 void RenderWidgetHostViewAndroid::ImeCancelComposition() { |
| 432 ime_adapter_android_.CancelComposition(); | 430 ime_adapter_android_.CancelComposition(); |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1039 // RenderWidgetHostView, public: | 1037 // RenderWidgetHostView, public: |
| 1040 | 1038 |
| 1041 // static | 1039 // static |
| 1042 RenderWidgetHostView* | 1040 RenderWidgetHostView* |
| 1043 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1041 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1044 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1042 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1045 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1043 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1046 } | 1044 } |
| 1047 | 1045 |
| 1048 } // namespace content | 1046 } // namespace content |
| OLD | NEW |