| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 RenderViewHost::From(GetRenderWidgetHost())); | 820 RenderViewHost::From(GetRenderWidgetHost())); |
| 821 // Unblock the compositor. | 821 // Unblock the compositor. |
| 822 BrowserThread::PostTask( | 822 BrowserThread::PostTask( |
| 823 BrowserThread::UI, FROM_HERE, | 823 BrowserThread::UI, FROM_HERE, |
| 824 base::Bind(&RenderViewDevToolsAgentHost::SynchronousSwapCompositorFrame, | 824 base::Bind(&RenderViewDevToolsAgentHost::SynchronousSwapCompositorFrame, |
| 825 static_cast<RenderViewDevToolsAgentHost*>(dtah.get()), | 825 static_cast<RenderViewDevToolsAgentHost*>(dtah.get()), |
| 826 frame_metadata)); | 826 frame_metadata)); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 void RenderWidgetHostViewAndroid::SetOverlayVideoMode(bool enabled) { |
| 831 layer_->SetContentsOpaque(!enabled); |
| 832 } |
| 833 |
| 830 void RenderWidgetHostViewAndroid::SynchronousCopyContents( | 834 void RenderWidgetHostViewAndroid::SynchronousCopyContents( |
| 831 const gfx::Rect& src_subrect_in_pixel, | 835 const gfx::Rect& src_subrect_in_pixel, |
| 832 const gfx::Size& dst_size_in_pixel, | 836 const gfx::Size& dst_size_in_pixel, |
| 833 const base::Callback<void(bool, const SkBitmap&)>& callback) { | 837 const base::Callback<void(bool, const SkBitmap&)>& callback) { |
| 834 SynchronousCompositor* compositor = | 838 SynchronousCompositor* compositor = |
| 835 SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(), | 839 SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(), |
| 836 host_->GetRoutingID()); | 840 host_->GetRoutingID()); |
| 837 if (!compositor) { | 841 if (!compositor) { |
| 838 callback.Run(false, SkBitmap()); | 842 callback.Run(false, SkBitmap()); |
| 839 return; | 843 return; |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 // RenderWidgetHostView, public: | 1411 // RenderWidgetHostView, public: |
| 1408 | 1412 |
| 1409 // static | 1413 // static |
| 1410 RenderWidgetHostView* | 1414 RenderWidgetHostView* |
| 1411 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1415 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1412 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1416 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1413 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1417 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1414 } | 1418 } |
| 1415 | 1419 |
| 1416 } // namespace content | 1420 } // namespace content |
| OLD | NEW |