Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/l10n_util_win.h" | 8 #include "app/l10n_util_win.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 } | 1316 } |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 ForwardMouseEventToRenderer(message, wparam, lparam); | 1319 ForwardMouseEventToRenderer(message, wparam, lparam); |
| 1320 return 0; | 1320 return 0; |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, | 1323 LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, |
| 1324 LPARAM lparam, BOOL& handled) { | 1324 LPARAM lparam, BOOL& handled) { |
| 1325 handled = TRUE; | 1325 handled = TRUE; |
| 1326 DLOG(ERROR) << "KeyEvent " << message << " wParam " << wparam; | |
|
Peter Kasting
2010/10/14 20:30:45
Did you mean to leave this in?
brettw
2010/10/14 20:36:40
Whoops! Thanks.
| |
| 1326 | 1327 |
| 1327 // If we are a pop-up, forward tab related messages to our parent HWND, so | 1328 // If we are a pop-up, forward tab related messages to our parent HWND, so |
| 1328 // that we are dismissed appropriately and so that the focus advance in our | 1329 // that we are dismissed appropriately and so that the focus advance in our |
| 1329 // parent. | 1330 // parent. |
| 1330 // TODO(jcampan): http://b/issue?id=1192881 Could be abstracted in the | 1331 // TODO(jcampan): http://b/issue?id=1192881 Could be abstracted in the |
| 1331 // FocusManager. | 1332 // FocusManager. |
| 1332 if (close_on_deactivate_ && | 1333 if (close_on_deactivate_ && |
| 1333 (((message == WM_KEYDOWN || message == WM_KEYUP) && (wparam == VK_TAB)) || | 1334 (((message == WM_KEYDOWN || message == WM_KEYUP) && (wparam == VK_TAB)) || |
| 1334 (message == WM_CHAR && wparam == L'\t'))) { | 1335 (message == WM_CHAR && wparam == L'\t'))) { |
| 1335 DCHECK(parent_hwnd_); | 1336 DCHECK(parent_hwnd_); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1704 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 1705 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
| 1705 gfx::NativeView native_view) { | 1706 gfx::NativeView native_view) { |
| 1706 if (::IsWindow(native_view)) { | 1707 if (::IsWindow(native_view)) { |
| 1707 HANDLE raw_render_host_view = ::GetProp(native_view, | 1708 HANDLE raw_render_host_view = ::GetProp(native_view, |
| 1708 kRenderWidgetHostViewKey); | 1709 kRenderWidgetHostViewKey); |
| 1709 if (raw_render_host_view) | 1710 if (raw_render_host_view) |
| 1710 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); | 1711 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); |
| 1711 } | 1712 } |
| 1712 return NULL; | 1713 return NULL; |
| 1713 } | 1714 } |
| OLD | NEW |