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

Side by Side Diff: ui/aura/desktop_host_win.cc

Issue 8374005: aura: Try to make Linux host resize code more reliable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update a few other gfx::Rect calls Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/desktop_host_linux.cc ('k') | ui/aura/window_unittest.cc » ('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 (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 "ui/aura/desktop_host_win.h" 5 #include "ui/aura/desktop_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 } 100 }
101 101
102 } // namespace 102 } // namespace
103 103
104 // static 104 // static
105 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { 105 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) {
106 return new DesktopHostWin(bounds); 106 return new DesktopHostWin(bounds);
107 } 107 }
108 108
109 // static
110 gfx::Size DesktopHost::GetNativeDisplaySize() {
111 return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
112 GetSystemMetrics(SM_CYSCREEN));
113 }
114
109 DesktopHostWin::DesktopHostWin(const gfx::Rect& bounds) : desktop_(NULL) { 115 DesktopHostWin::DesktopHostWin(const gfx::Rect& bounds) : desktop_(NULL) {
110 Init(NULL, bounds); 116 Init(NULL, bounds);
111 SetWindowText(hwnd(), L"aura::Desktop!"); 117 SetWindowText(hwnd(), L"aura::Desktop!");
112 } 118 }
113 119
114 DesktopHostWin::~DesktopHostWin() { 120 DesktopHostWin::~DesktopHostWin() {
115 DestroyWindow(hwnd()); 121 DestroyWindow(hwnd());
116 } 122 }
117 123
118 bool DesktopHostWin::Dispatch(const MSG& msg) { 124 bool DesktopHostWin::Dispatch(const MSG& msg) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void DesktopHostWin::OnPaint(HDC dc) { 205 void DesktopHostWin::OnPaint(HDC dc) {
200 desktop_->Draw(); 206 desktop_->Draw();
201 ValidateRect(hwnd(), NULL); 207 ValidateRect(hwnd(), NULL);
202 } 208 }
203 209
204 void DesktopHostWin::OnSize(UINT param, const CSize& size) { 210 void DesktopHostWin::OnSize(UINT param, const CSize& size) {
205 desktop_->OnHostResized(gfx::Size(size.cx, size.cy)); 211 desktop_->OnHostResized(gfx::Size(size.cx, size.cy));
206 } 212 }
207 213
208 } // namespace aura 214 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop_host_linux.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698