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

Side by Side Diff: ui/platform_window/win/win_window.cc

Issue 2741533002: Fix AshWindowTreeHost shutdown for Ozone X11. (Closed)
Patch Set: Add to other PlatformWindow implementations. Created 3 years, 9 months 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
« no previous file with comments | « ui/platform_window/win/win_window.h ('k') | ui/platform_window/x11/x11_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ui/platform_window/win/win_window.h" 5 #include "ui/platform_window/win/win_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 void WinWindow::Hide() { 69 void WinWindow::Hide() {
70 ShowWindow(hwnd(), SW_HIDE); 70 ShowWindow(hwnd(), SW_HIDE);
71 } 71 }
72 72
73 void WinWindow::Close() { 73 void WinWindow::Close() {
74 Destroy(); 74 Destroy();
75 } 75 }
76 76
77 void WinWindow::PrepareForShutdown() {}
78
77 void WinWindow::SetBounds(const gfx::Rect& bounds) { 79 void WinWindow::SetBounds(const gfx::Rect& bounds) {
78 gfx::Rect window_bounds = GetWindowBoundsForClientBounds( 80 gfx::Rect window_bounds = GetWindowBoundsForClientBounds(
79 GetWindowLong(hwnd(), GWL_STYLE), 81 GetWindowLong(hwnd(), GWL_STYLE),
80 GetWindowLong(hwnd(), GWL_EXSTYLE), 82 GetWindowLong(hwnd(), GWL_EXSTYLE),
81 bounds); 83 bounds);
82 unsigned int flags = SWP_NOREPOSITION; 84 unsigned int flags = SWP_NOREPOSITION;
83 if (!::IsWindowVisible(hwnd())) 85 if (!::IsWindowVisible(hwnd()))
84 flags |= SWP_NOACTIVATE; 86 flags |= SWP_NOACTIVATE;
85 SetWindowPos(hwnd(), NULL, window_bounds.x(), window_bounds.y(), 87 SetWindowPos(hwnd(), NULL, window_bounds.x(), window_bounds.y(),
86 window_bounds.width(), window_bounds.height(), flags); 88 window_bounds.width(), window_bounds.height(), flags);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 198
197 namespace test { 199 namespace test {
198 200
199 // static 201 // static
200 void SetUsePopupAsRootWindowForTest(bool use) { 202 void SetUsePopupAsRootWindowForTest(bool use) {
201 use_popup_as_root_window_for_test = use; 203 use_popup_as_root_window_for_test = use;
202 } 204 }
203 205
204 } // namespace test 206 } // namespace test
205 } // namespace ui 207 } // namespace ui
OLDNEW
« no previous file with comments | « ui/platform_window/win/win_window.h ('k') | ui/platform_window/x11/x11_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698