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_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
10 #include <stack> | 10 #include <stack> |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 | 920 |
921 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( | 921 BackingStore* RenderWidgetHostViewWin::AllocBackingStore( |
922 const gfx::Size& size) { | 922 const gfx::Size& size) { |
923 return new BackingStoreWin(render_widget_host_, size); | 923 return new BackingStoreWin(render_widget_host_, size); |
924 } | 924 } |
925 | 925 |
926 void RenderWidgetHostViewWin::CopyFromCompositingSurface( | 926 void RenderWidgetHostViewWin::CopyFromCompositingSurface( |
927 const gfx::Rect& src_subrect, | 927 const gfx::Rect& src_subrect, |
928 const gfx::Size& dst_size, | 928 const gfx::Size& dst_size, |
929 const base::Callback<void(bool)>& callback, | 929 const base::Callback<void(bool)>& callback, |
930 skia::PlatformCanvas* output) { | 930 skia::PlatformBitmap* output) { |
931 base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false)); | 931 base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false)); |
932 if (!accelerated_surface_.get()) | 932 if (!accelerated_surface_.get()) |
933 return; | 933 return; |
934 | 934 |
935 if (dst_size.IsEmpty()) | 935 if (dst_size.IsEmpty()) |
936 return; | 936 return; |
937 | 937 |
938 if (!output->initialize(dst_size.width(), dst_size.height(), true)) | 938 if (!output->Allocate(dst_size.width(), dst_size.height(), true)) |
939 return; | 939 return; |
940 | 940 |
941 const bool result = accelerated_surface_->CopyTo( | 941 const bool result = accelerated_surface_->CopyTo( |
942 src_subrect, | 942 src_subrect, |
943 dst_size, | 943 dst_size, |
944 output->getTopDevice()->accessBitmap(true).getPixels()); | 944 output->GetBitmap().getPixels()); |
945 scoped_callback_runner.Release(); | 945 scoped_callback_runner.Release(); |
946 callback.Run(result); | 946 callback.Run(result); |
947 } | 947 } |
948 | 948 |
949 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { | 949 void RenderWidgetHostViewWin::SetBackground(const SkBitmap& background) { |
950 RenderWidgetHostViewBase::SetBackground(background); | 950 RenderWidgetHostViewBase::SetBackground(background); |
951 render_widget_host_->SetBackground(background); | 951 render_widget_host_->SetBackground(background); |
952 } | 952 } |
953 | 953 |
954 void RenderWidgetHostViewWin::ProcessTouchAck( | 954 void RenderWidgetHostViewWin::ProcessTouchAck( |
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3130 // receive a focus change in the context of a pointer down message, it means | 3130 // receive a focus change in the context of a pointer down message, it means |
3131 // that the pointer down message occurred on the edit field and we should | 3131 // that the pointer down message occurred on the edit field and we should |
3132 // display the on screen keyboard | 3132 // display the on screen keyboard |
3133 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3133 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3134 DisplayOnScreenKeyboardIfNeeded(); | 3134 DisplayOnScreenKeyboardIfNeeded(); |
3135 received_focus_change_after_pointer_down_ = false; | 3135 received_focus_change_after_pointer_down_ = false; |
3136 pointer_down_context_ = false; | 3136 pointer_down_context_ = false; |
3137 } | 3137 } |
3138 | 3138 |
3139 } // namespace content | 3139 } // namespace content |
OLD | NEW |