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 // Need Win 7 headers for WM_GESTURE and ChangeWindowMessageFilterEx | 5 // Need Win 7 headers for WM_GESTURE and ChangeWindowMessageFilterEx |
6 // TODO(jschuh): See crbug.com/92941 for longterm fix. | 6 // TODO(jschuh): See crbug.com/92941 for longterm fix. |
7 #undef WINVER | 7 #undef WINVER |
8 #define WINVER _WIN32_WINNT_WIN7 | 8 #define WINVER _WIN32_WINNT_WIN7 |
9 #undef _WIN32_WINNT | 9 #undef _WIN32_WINNT |
10 #define _WIN32_WINNT _WIN32_WINNT_WIN7 | 10 #define _WIN32_WINNT _WIN32_WINNT_WIN7 |
11 #include <windows.h> | 11 #include <windows.h> |
12 | 12 |
13 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" | 13 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
14 | 14 |
15 #include <algorithm> | 15 #include <algorithm> |
16 | 16 |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/i18n/rtl.h" | 18 #include "base/i18n/rtl.h" |
19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
20 #include "base/process_util.h" | 20 #include "base/process_util.h" |
21 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
22 #include "base/win/scoped_comptr.h" | 22 #include "base/win/scoped_comptr.h" |
23 #include "base/win/scoped_gdi_object.h" | 23 #include "base/win/scoped_gdi_object.h" |
(...skipping 11 matching lines...) Expand all Loading... |
35 #include "content/common/content_switches.h" | 35 #include "content/common/content_switches.h" |
36 #include "content/common/native_web_keyboard_event.h" | 36 #include "content/common/native_web_keyboard_event.h" |
37 #include "content/common/notification_service.h" | 37 #include "content/common/notification_service.h" |
38 #include "content/common/plugin_messages.h" | 38 #include "content/common/plugin_messages.h" |
39 #include "content/common/view_messages.h" | 39 #include "content/common/view_messages.h" |
40 #include "skia/ext/skia_utils_win.h" | 40 #include "skia/ext/skia_utils_win.h" |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
43 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact
ory.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact
ory.h" |
44 #include "ui/base/ime/composition_text.h" | 44 #include "ui/base/ime/composition_text.h" |
45 #include "ui/base/l10n/l10n_util.h" | |
46 #include "ui/base/l10n/l10n_util_win.h" | 45 #include "ui/base/l10n/l10n_util_win.h" |
47 #include "ui/base/resource/resource_bundle.h" | |
48 #include "ui/base/text/text_elider.h" | 46 #include "ui/base/text/text_elider.h" |
49 #include "ui/base/view_prop.h" | 47 #include "ui/base/view_prop.h" |
50 #include "ui/base/win/hwnd_util.h" | 48 #include "ui/base/win/hwnd_util.h" |
51 #include "ui/gfx/canvas.h" | 49 #include "ui/gfx/canvas.h" |
52 #include "ui/gfx/canvas_skia.h" | 50 #include "ui/gfx/canvas_skia.h" |
53 #include "ui/gfx/gdi_util.h" | 51 #include "ui/gfx/gdi_util.h" |
54 #include "ui/gfx/rect.h" | 52 #include "ui/gfx/rect.h" |
55 #include "ui/gfx/screen.h" | 53 #include "ui/gfx/screen.h" |
56 #include "views/accessibility/native_view_accessibility_win.h" | 54 #include "views/accessibility/native_view_accessibility_win.h" |
57 #include "views/focus/focus_manager.h" | 55 #include "views/focus/focus_manager.h" |
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 DWORD ex_style) { | 1854 DWORD ex_style) { |
1857 parent_hwnd_ = parent_hwnd; | 1855 parent_hwnd_ = parent_hwnd; |
1858 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); | 1856 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); |
1859 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); | 1857 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); |
1860 // To show tooltip on popup window.(e.g. title in <select>) | 1858 // To show tooltip on popup window.(e.g. title in <select>) |
1861 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. | 1859 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. |
1862 // Ensure the tooltip is created otherwise tooltips are never shown. | 1860 // Ensure the tooltip is created otherwise tooltips are never shown. |
1863 EnsureTooltip(); | 1861 EnsureTooltip(); |
1864 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); | 1862 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); |
1865 } | 1863 } |
OLD | NEW |