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"); | |
412 if (host_) | 411 if (host_) |
413 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), | 412 host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), |
414 frame_time)); | 413 frame_time)); |
415 } | 414 } |
416 | 415 |
417 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( | 416 void RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame( |
418 bool enabled) { | 417 bool enabled) { |
419 TRACE_EVENT1("cc", "RenderWidgetHostViewAndroid::OnSetNeedsBeginFrame", | |
420 "enabled", enabled); | |
421 if (content_view_core_) | 418 if (content_view_core_) |
422 content_view_core_->SetVSyncNotificationEnabled(enabled); | 419 content_view_core_->SetVSyncNotificationEnabled(enabled); |
423 } | 420 } |
424 | 421 |
425 void RenderWidgetHostViewAndroid::OnStartContentIntent( | 422 void RenderWidgetHostViewAndroid::OnStartContentIntent( |
426 const GURL& content_url) { | 423 const GURL& content_url) { |
427 if (content_view_core_) | 424 if (content_view_core_) |
428 content_view_core_->StartContentIntent(content_url); | 425 content_view_core_->StartContentIntent(content_url); |
429 } | 426 } |
430 | 427 |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 // RenderWidgetHostView, public: | 1097 // RenderWidgetHostView, public: |
1101 | 1098 |
1102 // static | 1099 // static |
1103 RenderWidgetHostView* | 1100 RenderWidgetHostView* |
1104 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1101 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1105 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1102 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1106 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1103 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1107 } | 1104 } |
1108 | 1105 |
1109 } // namespace content | 1106 } // namespace content |
OLD | NEW |