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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 aura::client::CursorClient* cursor_client = | 927 aura::client::CursorClient* cursor_client = |
928 aura::client::GetCursorClient(root); | 928 aura::client::GetCursorClient(root); |
929 if (cursor_client && !cursor_client->IsCursorVisible()) | 929 if (cursor_client && !cursor_client->IsCursorVisible()) |
930 cursor_client->DisableMouseEvents(); | 930 cursor_client->DisableMouseEvents(); |
931 } | 931 } |
932 | 932 |
933 void RenderWidgetHostViewAura::CopyFromCompositingSurface( | 933 void RenderWidgetHostViewAura::CopyFromCompositingSurface( |
934 const gfx::Rect& src_subrect, | 934 const gfx::Rect& src_subrect, |
935 const gfx::Size& dst_size, | 935 const gfx::Size& dst_size, |
936 const base::Callback<void(bool, const SkBitmap&)>& callback, | 936 const base::Callback<void(bool, const SkBitmap&)>& callback, |
937 const SkBitmap::Config config) { | 937 const SkColorType color_type) { |
938 delegated_frame_host_->CopyFromCompositingSurface( | 938 delegated_frame_host_->CopyFromCompositingSurface( |
939 src_subrect, dst_size, callback, config); | 939 src_subrect, dst_size, callback, color_type); |
940 } | 940 } |
941 | 941 |
942 void RenderWidgetHostViewAura::CopyFromCompositingSurfaceToVideoFrame( | 942 void RenderWidgetHostViewAura::CopyFromCompositingSurfaceToVideoFrame( |
943 const gfx::Rect& src_subrect, | 943 const gfx::Rect& src_subrect, |
944 const scoped_refptr<media::VideoFrame>& target, | 944 const scoped_refptr<media::VideoFrame>& target, |
945 const base::Callback<void(bool)>& callback) { | 945 const base::Callback<void(bool)>& callback) { |
946 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( | 946 delegated_frame_host_->CopyFromCompositingSurfaceToVideoFrame( |
947 src_subrect, target, callback); | 947 src_subrect, target, callback); |
948 } | 948 } |
949 | 949 |
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2412 NativeWebKeyboardEvent copy_event(event); | 2412 NativeWebKeyboardEvent copy_event(event); |
2413 copy_event.match_edit_command = true; | 2413 copy_event.match_edit_command = true; |
2414 host_->ForwardKeyboardEvent(copy_event); | 2414 host_->ForwardKeyboardEvent(copy_event); |
2415 return; | 2415 return; |
2416 } | 2416 } |
2417 #endif | 2417 #endif |
2418 | 2418 |
2419 host_->ForwardKeyboardEvent(event); | 2419 host_->ForwardKeyboardEvent(event); |
2420 } | 2420 } |
2421 | 2421 |
2422 SkBitmap::Config RenderWidgetHostViewAura::PreferredReadbackFormat() { | 2422 SkColorType RenderWidgetHostViewAura::PreferredReadbackFormat() { |
2423 return SkBitmap::kARGB_8888_Config; | 2423 return kN32_SkColorType; |
2424 } | 2424 } |
2425 | 2425 |
2426 //////////////////////////////////////////////////////////////////////////////// | 2426 //////////////////////////////////////////////////////////////////////////////// |
2427 // DelegatedFrameHost, public: | 2427 // DelegatedFrameHost, public: |
2428 | 2428 |
2429 ui::Compositor* RenderWidgetHostViewAura::GetCompositor() const { | 2429 ui::Compositor* RenderWidgetHostViewAura::GetCompositor() const { |
2430 aura::WindowTreeHost* host = window_->GetHost(); | 2430 aura::WindowTreeHost* host = window_->GetHost(); |
2431 return host ? host->compositor() : NULL; | 2431 return host ? host->compositor() : NULL; |
2432 } | 2432 } |
2433 | 2433 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2477 | 2477 |
2478 //////////////////////////////////////////////////////////////////////////////// | 2478 //////////////////////////////////////////////////////////////////////////////// |
2479 // RenderWidgetHostViewBase, public: | 2479 // RenderWidgetHostViewBase, public: |
2480 | 2480 |
2481 // static | 2481 // static |
2482 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2482 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2483 GetScreenInfoForWindow(results, NULL); | 2483 GetScreenInfoForWindow(results, NULL); |
2484 } | 2484 } |
2485 | 2485 |
2486 } // namespace content | 2486 } // namespace content |
OLD | NEW |