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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 SkColor color) { | 408 SkColor color) { |
409 if (cached_background_color_ == color) | 409 if (cached_background_color_ == color) |
410 return; | 410 return; |
411 | 411 |
412 cached_background_color_ = color; | 412 cached_background_color_ = color; |
413 if (content_view_core_) | 413 if (content_view_core_) |
414 content_view_core_->OnBackgroundColorChanged(color); | 414 content_view_core_->OnBackgroundColorChanged(color); |
415 } | 415 } |
416 | 416 |
417 void RenderWidgetHostViewAndroid::SendBeginFrame( | 417 void RenderWidgetHostViewAndroid::SendBeginFrame( |
418 base::TimeTicks frame_time) { | 418 const cc::BeginFrameArgs& args) { |
419 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::SendBeginFrame"); | 419 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::SendBeginFrame"); |
420 if (host_) | 420 if (host_) |
421 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), | 421 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args)); |
422 frame_time)); | |
423 } | 422 } |
424 | 423 |
425 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( | 424 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( |
426 bool enabled) { | 425 bool enabled) { |
427 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame", | 426 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame", |
428 "enabled", enabled); | 427 "enabled", enabled); |
429 if (content_view_core_) | 428 if (content_view_core_) |
430 content_view_core_->SetVSyncNotificationEnabled(enabled); | 429 content_view_core_->SetNeedsBeginFrame(enabled); |
431 } | 430 } |
432 | 431 |
433 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 432 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
434 const GURL& content_url) { | 433 const GURL& content_url) { |
435 if (content_view_core_) | 434 if (content_view_core_) |
436 content_view_core_->StartContentIntent(content_url); | 435 content_view_core_->StartContentIntent(content_url); |
437 } | 436 } |
438 | 437 |
439 void RenderWidgetHostViewAndroid::ImeCancelComposition() { | 438 void RenderWidgetHostViewAndroid::ImeCancelComposition() { |
440 ime_adapter_android_.CancelComposition(); | 439 ime_adapter_android_.CancelComposition(); |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 // RenderWidgetHostView, public: | 1107 // RenderWidgetHostView, public: |
1109 | 1108 |
1110 // static | 1109 // static |
1111 RenderWidgetHostView* | 1110 RenderWidgetHostView* |
1112 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1111 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1113 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1112 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1114 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1113 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1115 } | 1114 } |
1116 | 1115 |
1117 } // namespace content | 1116 } // namespace content |
OLD | NEW |