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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( |
410 base::TimeTicks frame_time) { | 410 base::TimeTicks frame_time) { |
| 411 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::SendBeginFrame"); |
411 if (host_) | 412 if (host_) |
412 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), | 413 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), |
413 frame_time)); | 414 frame_time)); |
414 } | 415 } |
415 | 416 |
416 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( | 417 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( |
417 bool enabled) { | 418 bool enabled) { |
| 419 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame", |
| 420 "enabled", enabled); |
418 if (content_view_core_) | 421 if (content_view_core_) |
419 content_view_core_->SetVSyncNotificationEnabled(enabled); | 422 content_view_core_->SetVSyncNotificationEnabled(enabled); |
420 } | 423 } |
421 | 424 |
422 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 425 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
423 const GURL& content_url) { | 426 const GURL& content_url) { |
424 if (content_view_core_) | 427 if (content_view_core_) |
425 content_view_core_->StartContentIntent(content_url); | 428 content_view_core_->StartContentIntent(content_url); |
426 } | 429 } |
427 | 430 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 // RenderWidgetHostView, public: | 1039 // RenderWidgetHostView, public: |
1037 | 1040 |
1038 // static | 1041 // static |
1039 RenderWidgetHostView* | 1042 RenderWidgetHostView* |
1040 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1043 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1041 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1044 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1042 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1045 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1043 } | 1046 } |
1044 | 1047 |
1045 } // namespace content | 1048 } // namespace content |
OLD | NEW |