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

Side by Side Diff: content/browser/renderer_host/legacy_render_widget_host_win.cc

Issue 2467913002: Touch event flag should control only DOM event firing. (Closed)
Patch Set: Change the string in "about://flags" Created 4 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/legacy_render_widget_host_win.h" 5 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/win/win_util.h" 10 #include "base/win/win_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 Base::Create(parent, rect, L"Chrome Legacy Window", 105 Base::Create(parent, rect, L"Chrome Legacy Window",
106 WS_CHILDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 106 WS_CHILDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
107 WS_EX_TRANSPARENT); 107 WS_EX_TRANSPARENT);
108 } 108 }
109 109
110 LegacyRenderWidgetHostHWND::~LegacyRenderWidgetHostHWND() { 110 LegacyRenderWidgetHostHWND::~LegacyRenderWidgetHostHWND() {
111 DCHECK(!::IsWindow(hwnd())); 111 DCHECK(!::IsWindow(hwnd()));
112 } 112 }
113 113
114 bool LegacyRenderWidgetHostHWND::Init() { 114 bool LegacyRenderWidgetHostHWND::Init() {
115 if (base::win::GetVersion() >= base::win::VERSION_WIN7 && 115 if (base::win::GetVersion() >= base::win::VERSION_WIN7)
116 ui::AreTouchEventsEnabled())
117 RegisterTouchWindow(hwnd(), TWF_WANTPALM); 116 RegisterTouchWindow(hwnd(), TWF_WANTPALM);
118 117
119 HRESULT hr = ::CreateStdAccessibleObject( 118 HRESULT hr = ::CreateStdAccessibleObject(
120 hwnd(), OBJID_WINDOW, IID_IAccessible, 119 hwnd(), OBJID_WINDOW, IID_IAccessible,
121 reinterpret_cast<void **>(window_accessible_.Receive())); 120 reinterpret_cast<void **>(window_accessible_.Receive()));
122 DCHECK(SUCCEEDED(hr)); 121 DCHECK(SUCCEEDED(hr));
123 122
124 if (!BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { 123 if (!BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
125 // Attempt to detect screen readers or other clients who want full 124 // Attempt to detect screen readers or other clients who want full
126 // accessibility support, by seeing if they respond to this event. 125 // accessibility support, by seeing if they respond to this event.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 direct_manipulation_helper_->Activate(hwnd()); 405 direct_manipulation_helper_->Activate(hwnd());
407 } else if (window_pos->flags & SWP_HIDEWINDOW) { 406 } else if (window_pos->flags & SWP_HIDEWINDOW) {
408 direct_manipulation_helper_->Deactivate(hwnd()); 407 direct_manipulation_helper_->Deactivate(hwnd());
409 } 408 }
410 } 409 }
411 SetMsgHandled(FALSE); 410 SetMsgHandled(FALSE);
412 return 0; 411 return 0;
413 } 412 }
414 413
415 } // namespace content 414 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698