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 #include "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 547 |
548 void RenderWidgetHostViewWin::Focus() { | 548 void RenderWidgetHostViewWin::Focus() { |
549 if (IsWindow()) | 549 if (IsWindow()) |
550 SetFocus(); | 550 SetFocus(); |
551 } | 551 } |
552 | 552 |
553 void RenderWidgetHostViewWin::Blur() { | 553 void RenderWidgetHostViewWin::Blur() { |
554 NOTREACHED(); | 554 NOTREACHED(); |
555 } | 555 } |
556 | 556 |
557 bool RenderWidgetHostViewWin::HasFocus() { | 557 bool RenderWidgetHostViewWin::HasFocus() const { |
558 return ::GetFocus() == m_hWnd; | 558 return ::GetFocus() == m_hWnd; |
559 } | 559 } |
560 | 560 |
561 void RenderWidgetHostViewWin::Show() { | 561 void RenderWidgetHostViewWin::Show() { |
562 if (!is_fullscreen_) { | 562 if (!is_fullscreen_) { |
563 DCHECK(parent_hwnd_); | 563 DCHECK(parent_hwnd_); |
564 DCHECK(parent_hwnd_ != GetDesktopWindow()); | 564 DCHECK(parent_hwnd_ != GetDesktopWindow()); |
565 SetParent(parent_hwnd_); | 565 SetParent(parent_hwnd_); |
566 } | 566 } |
567 ShowWindow(SW_SHOW); | 567 ShowWindow(SW_SHOW); |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 | 2014 |
2015 if (message == WM_MOUSEMOVE) { | 2015 if (message == WM_MOUSEMOVE) { |
2016 CPoint center = GetClientCenter(); | 2016 CPoint center = GetClientCenter(); |
2017 // Ignore WM_MOUSEMOVE messages generated by MoveCursorToCenter(). | 2017 // Ignore WM_MOUSEMOVE messages generated by MoveCursorToCenter(). |
2018 if (LOWORD(lparam) == center.x && HIWORD(lparam) == center.y) | 2018 if (LOWORD(lparam) == center.x && HIWORD(lparam) == center.y) |
2019 return; | 2019 return; |
2020 } | 2020 } |
2021 | 2021 |
2022 ForwardMouseEventToRenderer(message, wparam, lparam); | 2022 ForwardMouseEventToRenderer(message, wparam, lparam); |
2023 } | 2023 } |
2024 | |
OLD | NEW |