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

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

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 1 month 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
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 14 matching lines...) Expand all
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/cursors/webcursor.h" 30 #include "content/common/cursors/webcursor.h"
31 #include "content/common/plugin_constants_win.h" 31 #include "content/common/plugin_constants_win.h"
32 #include "content/public/common/content_constants.h" 32 #include "content/public/common/content_constants.h"
33 #include "skia/ext/platform_canvas.h" 33 #include "skia/ext/platform_canvas.h"
34 #include "third_party/WebKit/public/web/WebInputEvent.h" 34 #include "third_party/WebKit/public/web/WebInputEvent.h"
35 #include "ui/gfx/win/dpi.h" 35 #include "ui/gfx/dpi.h"
36 #include "ui/gfx/win/hwnd_util.h" 36 #include "ui/gfx/win/hwnd_util.h"
37 37
38 using blink::WebKeyboardEvent; 38 using blink::WebKeyboardEvent;
39 using blink::WebInputEvent; 39 using blink::WebInputEvent;
40 using blink::WebMouseEvent; 40 using blink::WebMouseEvent;
41 41
42 namespace content { 42 namespace content {
43 43
44 namespace { 44 namespace {
45 45
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 } 755 }
756 756
757 bool WebPluginDelegateImpl::WindowedReposition( 757 bool WebPluginDelegateImpl::WindowedReposition(
758 const gfx::Rect& window_rect_in_dip, 758 const gfx::Rect& window_rect_in_dip,
759 const gfx::Rect& clip_rect_in_dip) { 759 const gfx::Rect& clip_rect_in_dip) {
760 if (!windowed_handle_) { 760 if (!windowed_handle_) {
761 NOTREACHED(); 761 NOTREACHED();
762 return false; 762 return false;
763 } 763 }
764 764
765 gfx::Rect window_rect = gfx::win::DIPToScreenRect(window_rect_in_dip); 765 gfx::Rect window_rect = gfx::DIPToScreenRect(window_rect_in_dip);
766 gfx::Rect clip_rect = gfx::win::DIPToScreenRect(clip_rect_in_dip); 766 gfx::Rect clip_rect = gfx::DIPToScreenRect(clip_rect_in_dip);
767 if (window_rect_ == window_rect && clip_rect_ == clip_rect) 767 if (window_rect_ == window_rect && clip_rect_ == clip_rect)
768 return false; 768 return false;
769 769
770 // We only set the plugin's size here. Its position is moved elsewhere, which 770 // We only set the plugin's size here. Its position is moved elsewhere, which
771 // allows the window moves/scrolling/clipping to be synchronized with the page 771 // allows the window moves/scrolling/clipping to be synchronized with the page
772 // and other windows. 772 // and other windows.
773 // If the plugin window has no parent, then don't focus it because it isn't 773 // If the plugin window has no parent, then don't focus it because it isn't
774 // being displayed anywhere. See: 774 // being displayed anywhere. See:
775 // http://code.google.com/p/chromium/issues/detail?id=32658 775 // http://code.google.com/p/chromium/issues/detail?id=32658
776 if (window_rect.size() != window_rect_.size()) { 776 if (window_rect.size() != window_rect_.size()) {
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 case WM_RBUTTONUP: 1484 case WM_RBUTTONUP:
1485 ::ReleaseCapture(); 1485 ::ReleaseCapture();
1486 break; 1486 break;
1487 1487
1488 default: 1488 default:
1489 break; 1489 break;
1490 } 1490 }
1491 } 1491 }
1492 1492
1493 } // namespace content 1493 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698