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_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <InputScope.h> | 8 #include <InputScope.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 | 1494 |
1495 if ((is_fullscreen_ || close_on_deactivate_) && | 1495 if ((is_fullscreen_ || close_on_deactivate_) && |
1496 !weak_factory_.HasWeakPtrs()) { | 1496 !weak_factory_.HasWeakPtrs()) { |
1497 // Dismiss popups and menus. We do this asynchronously to avoid changing | 1497 // Dismiss popups and menus. We do this asynchronously to avoid changing |
1498 // activation within this callstack, which may interfere with another window | 1498 // activation within this callstack, which may interfere with another window |
1499 // being activated. We can synchronously hide the window, but we need to | 1499 // being activated. We can synchronously hide the window, but we need to |
1500 // not change activation while doing so. | 1500 // not change activation while doing so. |
1501 SetWindowPos(NULL, 0, 0, 0, 0, | 1501 SetWindowPos(NULL, 0, 0, 0, 0, |
1502 SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE | | 1502 SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE | |
1503 SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER); | 1503 SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER); |
1504 MessageLoop::current()->PostTask(FROM_HERE, | 1504 base::MessageLoop::current()->PostTask( |
| 1505 FROM_HERE, |
1505 base::Bind(&RenderWidgetHostViewWin::ShutdownHost, | 1506 base::Bind(&RenderWidgetHostViewWin::ShutdownHost, |
1506 weak_factory_.GetWeakPtr())); | 1507 weak_factory_.GetWeakPtr())); |
1507 } | 1508 } |
1508 } | 1509 } |
1509 | 1510 |
1510 void RenderWidgetHostViewWin::OnInputLangChange(DWORD character_set, | 1511 void RenderWidgetHostViewWin::OnInputLangChange(DWORD character_set, |
1511 HKL input_language_id) { | 1512 HKL input_language_id) { |
1512 TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnInputLangChange"); | 1513 TRACE_EVENT0("browser", "RenderWidgetHostViewWin::OnInputLangChange"); |
1513 // Send the given Locale ID to the ImeInput object and retrieves whether | 1514 // Send the given Locale ID to the ImeInput object and retrieves whether |
1514 // or not the current input context has IMEs. | 1515 // or not the current input context has IMEs. |
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3135 return new RenderWidgetHostViewWin(widget); | 3136 return new RenderWidgetHostViewWin(widget); |
3136 } | 3137 } |
3137 | 3138 |
3138 // static | 3139 // static |
3139 void RenderWidgetHostViewPort::GetDefaultScreenInfo( | 3140 void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
3140 WebKit::WebScreenInfo* results) { | 3141 WebKit::WebScreenInfo* results) { |
3141 GetScreenInfoForWindow(results, 0); | 3142 GetScreenInfoForWindow(results, 0); |
3142 } | 3143 } |
3143 | 3144 |
3144 } // namespace content | 3145 } // namespace content |
OLD | NEW |