OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 BitBlt(dc, | 169 BitBlt(dc, |
170 0, | 170 0, |
171 0, | 171 0, |
172 paint_rect.width(), | 172 paint_rect.width(), |
173 paint_rect.height(), | 173 paint_rect.height(), |
174 backing_store_dc, | 174 backing_store_dc, |
175 paint_rect.x(), | 175 paint_rect.x(), |
176 paint_rect.y(), | 176 paint_rect.y(), |
177 SRCCOPY); | 177 SRCCOPY); |
178 } | 178 } |
179 canvas.FillRectInt(color, 0, 0, paint_rect.width(), paint_rect.height()); | 179 canvas.FillRect(color, gfx::Rect(gfx::Point(), paint_rect.size())); |
180 skia::DrawToNativeContext(canvas.sk_canvas(), paint_dc, paint_rect.x(), | 180 skia::DrawToNativeContext(canvas.sk_canvas(), paint_dc, paint_rect.x(), |
181 paint_rect.y(), NULL); | 181 paint_rect.y(), NULL); |
182 } | 182 } |
183 | 183 |
184 // The plugin wrapper window which lives in the browser process has this proc | 184 // The plugin wrapper window which lives in the browser process has this proc |
185 // as its window procedure. We only handle the WM_PARENTNOTIFY message sent by | 185 // as its window procedure. We only handle the WM_PARENTNOTIFY message sent by |
186 // windowed plugins for mouse input. This is forwarded off to the wrappers | 186 // windowed plugins for mouse input. This is forwarded off to the wrappers |
187 // parent which is typically the RVH window which turns on user gesture. | 187 // parent which is typically the RVH window which turns on user gesture. |
188 LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message, | 188 LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message, |
189 WPARAM wparam, LPARAM lparam) { | 189 WPARAM wparam, LPARAM lparam) { |
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 | 2014 |
2015 if (message == WM_MOUSEMOVE) { | 2015 if (message == WM_MOUSEMOVE) { |
2016 CPoint center = GetClientCenter(); | 2016 CPoint center = GetClientCenter(); |
2017 // Ignore WM_MOUSEMOVE messages generated by MoveCursorToCenter(). | 2017 // Ignore WM_MOUSEMOVE messages generated by MoveCursorToCenter(). |
2018 if (LOWORD(lparam) == center.x && HIWORD(lparam) == center.y) | 2018 if (LOWORD(lparam) == center.x && HIWORD(lparam) == center.y) |
2019 return; | 2019 return; |
2020 } | 2020 } |
2021 | 2021 |
2022 ForwardMouseEventToRenderer(message, wparam, lparam); | 2022 ForwardMouseEventToRenderer(message, wparam, lparam); |
2023 } | 2023 } |
OLD | NEW |