Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/browser/renderer_host/render_widget_host_view_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 10 #include "content/port/browser/smooth_scroll_gesture.h" | 10 #include "content/port/browser/smooth_scroll_gesture.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 } | 140 } |
| 141 DCHECK(atom); | 141 DCHECK(atom); |
| 142 | 142 |
| 143 HWND orig_parent = ::GetParent(window); | 143 HWND orig_parent = ::GetParent(window); |
| 144 HWND parent = CreateWindowEx( | 144 HWND parent = CreateWindowEx( |
| 145 WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR, | 145 WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR, |
| 146 MAKEINTATOM(atom), 0, | 146 MAKEINTATOM(atom), 0, |
| 147 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, | 147 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, |
| 148 0, 0, 0, 0, orig_parent, 0, instance, 0); | 148 0, 0, 0, 0, orig_parent, 0, instance, 0); |
| 149 ui::CheckWindowCreated(parent); | 149 ui::CheckWindowCreated(parent); |
| 150 // If UIPI is enabled we need to add message filters for parents with | |
| 151 // children that cross process boundaries. | |
| 152 if (::GetPropW(orig_parent, webkit::npapi::kNativeWindowClassFilterProp)) { | |
|
cpu_(ooo_6.6-7.5)
2012/10/04 17:46:40
the constant webkit::npapi::kNativeWindowClassFilt
jschuh
2012/10/04 22:14:53
Done.
| |
| 153 // Process-wide message filters required on Vista must be added to: | |
| 154 // chrome_content_client.cc ChromeContentClient::SandboxPlugin | |
| 155 ChangeWindowMessageFilterEx(parent, WM_MOUSEWHEEL, MSGFLT_ALLOW, NULL); | |
| 156 ChangeWindowMessageFilterEx(parent, WM_GESTURE, MSGFLT_ALLOW, NULL); | |
| 157 ChangeWindowMessageFilterEx(parent, WM_APPCOMMAND, MSGFLT_ALLOW, NULL); | |
| 158 ::RemovePropW(orig_parent, webkit::npapi::kNativeWindowClassFilterProp); | |
| 159 } | |
| 160 ::SetParent(window, parent); | 150 ::SetParent(window, parent); |
| 161 // How many times we try to find a PluginProcessHost whose process matches | 151 // How many times we try to find a PluginProcessHost whose process matches |
| 162 // the HWND. | 152 // the HWND. |
| 163 static const int kMaxTries = 5; | 153 static const int kMaxTries = 5; |
| 164 BrowserThread::PostTask( | 154 BrowserThread::PostTask( |
| 165 BrowserThread::IO, | 155 BrowserThread::IO, |
| 166 FROM_HERE, | 156 FROM_HERE, |
| 167 base::Bind(&NotifyPluginProcessHostHelper, window, parent, kMaxTries)); | 157 base::Bind(&NotifyPluginProcessHostHelper, window, parent, kMaxTries)); |
| 168 return parent; | 158 return parent; |
| 169 } | 159 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 bool scroll_down_; | 455 bool scroll_down_; |
| 466 bool scroll_far_; | 456 bool scroll_far_; |
| 467 }; | 457 }; |
| 468 | 458 |
| 469 SmoothScrollGesture* RenderWidgetHostViewBase::CreateSmoothScrollGesture( | 459 SmoothScrollGesture* RenderWidgetHostViewBase::CreateSmoothScrollGesture( |
| 470 bool scroll_down, bool scroll_far) { | 460 bool scroll_down, bool scroll_far) { |
| 471 return new BasicMouseWheelSmoothScrollGesture(scroll_down, scroll_far); | 461 return new BasicMouseWheelSmoothScrollGesture(scroll_down, scroll_far); |
| 472 } | 462 } |
| 473 | 463 |
| 474 } // namespace content | 464 } // namespace content |
| OLD | NEW |