Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: content/child/npapi/webplugin_delegate_impl_win.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/child/npapi/webplugin_delegate_impl.h" 5 #include "content/child/npapi/webplugin_delegate_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 #include "base/win/windows_version.h" 24 #include "base/win/windows_version.h"
25 #include "content/child/npapi/plugin_instance.h" 25 #include "content/child/npapi/plugin_instance.h"
26 #include "content/child/npapi/plugin_lib.h" 26 #include "content/child/npapi/plugin_lib.h"
27 #include "content/child/npapi/plugin_stream_url.h" 27 #include "content/child/npapi/plugin_stream_url.h"
28 #include "content/child/npapi/webplugin.h" 28 #include "content/child/npapi/webplugin.h"
29 #include "content/child/npapi/webplugin_ime_win.h" 29 #include "content/child/npapi/webplugin_ime_win.h"
30 #include "content/common/plugin_constants_win.h" 30 #include "content/common/plugin_constants_win.h"
31 #include "content/public/common/content_constants.h" 31 #include "content/public/common/content_constants.h"
32 #include "skia/ext/platform_canvas.h" 32 #include "skia/ext/platform_canvas.h"
33 #include "third_party/WebKit/public/web/WebInputEvent.h" 33 #include "third_party/WebKit/public/web/WebInputEvent.h"
34 #include "ui/base/win/hwnd_util.h" 34 #include "ui/gfx/win/dpi.h"
35 #include "ui/gfx/dpi_win.h" 35 #include "ui/gfx/win/hwnd_util.h"
36 #include "webkit/common/cursors/webcursor.h" 36 #include "webkit/common/cursors/webcursor.h"
37 37
38 using WebKit::WebKeyboardEvent; 38 using WebKit::WebKeyboardEvent;
39 using WebKit::WebInputEvent; 39 using WebKit::WebInputEvent;
40 using WebKit::WebMouseEvent; 40 using WebKit::WebMouseEvent;
41 41
42 namespace content { 42 namespace content {
43 43
44 namespace { 44 namespace {
45 45
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 FARPROC WINAPI WebPluginDelegateImpl::GetProcAddressPatch(HMODULE module, 1455 FARPROC WINAPI WebPluginDelegateImpl::GetProcAddressPatch(HMODULE module,
1456 LPCSTR name) { 1456 LPCSTR name) {
1457 FARPROC imm_function = WebPluginIMEWin::GetProcAddress(name); 1457 FARPROC imm_function = WebPluginIMEWin::GetProcAddress(name);
1458 if (imm_function) 1458 if (imm_function)
1459 return imm_function; 1459 return imm_function;
1460 return ::GetProcAddress(module, name); 1460 return ::GetProcAddress(module, name);
1461 } 1461 }
1462 1462
1463 void WebPluginDelegateImpl::HandleCaptureForMessage(HWND window, 1463 void WebPluginDelegateImpl::HandleCaptureForMessage(HWND window,
1464 UINT message) { 1464 UINT message) {
1465 if (ui::GetClassName(window) != base::string16(kNativeWindowClassName)) 1465 if (gfx::GetClassName(window) != base::string16(kNativeWindowClassName))
1466 return; 1466 return;
1467 1467
1468 switch (message) { 1468 switch (message) {
1469 case WM_LBUTTONDOWN: 1469 case WM_LBUTTONDOWN:
1470 case WM_MBUTTONDOWN: 1470 case WM_MBUTTONDOWN:
1471 case WM_RBUTTONDOWN: 1471 case WM_RBUTTONDOWN:
1472 ::SetCapture(window); 1472 ::SetCapture(window);
1473 // As per documentation the WM_PARENTNOTIFY message is sent to the parent 1473 // As per documentation the WM_PARENTNOTIFY message is sent to the parent
1474 // window chain if mouse input is received by the child window. However 1474 // window chain if mouse input is received by the child window. However
1475 // the parent receives the WM_PARENTNOTIFY message only if we doubleclick 1475 // the parent receives the WM_PARENTNOTIFY message only if we doubleclick
1476 // on the window. We send the WM_PARENTNOTIFY message for mouse input 1476 // on the window. We send the WM_PARENTNOTIFY message for mouse input
1477 // messages to the parent to indicate that user action is expected. 1477 // messages to the parent to indicate that user action is expected.
1478 ::SendMessage(::GetParent(window), WM_PARENTNOTIFY, message, 0); 1478 ::SendMessage(::GetParent(window), WM_PARENTNOTIFY, message, 0);
1479 break; 1479 break;
1480 1480
1481 case WM_LBUTTONUP: 1481 case WM_LBUTTONUP:
1482 case WM_MBUTTONUP: 1482 case WM_MBUTTONUP:
1483 case WM_RBUTTONUP: 1483 case WM_RBUTTONUP:
1484 ::ReleaseCapture(); 1484 ::ReleaseCapture();
1485 break; 1485 break;
1486 1486
1487 default: 1487 default:
1488 break; 1488 break;
1489 } 1489 }
1490 } 1490 }
1491 1491
1492 } // namespace content 1492 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/zygote_host/zygote_host_impl_linux.cc ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698