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

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

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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/root_window_host_win.h ('k') | ui/aura/root_window_host_x11.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 (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 "ui/aura/root_window_host_win.h" 5 #include "ui/aura/root_window_host_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 22 matching lines...) Expand all
33 return new RootWindowHostWin(bounds); 33 return new RootWindowHostWin(bounds);
34 } 34 }
35 35
36 // static 36 // static
37 gfx::Size RootWindowHost::GetNativeScreenSize() { 37 gfx::Size RootWindowHost::GetNativeScreenSize() {
38 return gfx::Size(GetSystemMetrics(SM_CXSCREEN), 38 return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
39 GetSystemMetrics(SM_CYSCREEN)); 39 GetSystemMetrics(SM_CYSCREEN));
40 } 40 }
41 41
42 RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds) 42 RootWindowHostWin::RootWindowHostWin(const gfx::Rect& bounds)
43 : delegate_(NULL), 43 : fullscreen_(false),
44 fullscreen_(false),
45 has_capture_(false), 44 has_capture_(false),
46 saved_window_style_(0), 45 saved_window_style_(0),
47 saved_window_ex_style_(0) { 46 saved_window_ex_style_(0) {
48 if (use_popup_as_root_window_for_test) 47 if (use_popup_as_root_window_for_test)
49 set_window_style(WS_POPUP); 48 set_window_style(WS_POPUP);
50 Init(NULL, bounds); 49 Init(NULL, bounds);
51 SetWindowText(hwnd(), L"aura::RootWindow!"); 50 SetWindowText(hwnd(), L"aura::RootWindow!");
52 } 51 }
53 52
54 RootWindowHostWin::~RootWindowHostWin() { 53 RootWindowHostWin::~RootWindowHostWin() {
55 DestroyWindow(hwnd()); 54 DestroyWindow(hwnd());
56 } 55 }
57 56
58 void RootWindowHostWin::SetDelegate(RootWindowHostDelegate* delegate) {
59 delegate_ = delegate;
60 }
61
62 RootWindow* RootWindowHostWin::GetRootWindow() { 57 RootWindow* RootWindowHostWin::GetRootWindow() {
63 return delegate_->AsRootWindow(); 58 return delegate_->AsRootWindow();
64 } 59 }
65 60
66 gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() { 61 gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() {
67 return hwnd(); 62 return hwnd();
68 } 63 }
69 64
70 void RootWindowHostWin::Show() { 65 void RootWindowHostWin::Show() {
71 ShowWindow(hwnd(), SW_SHOWNORMAL); 66 ShowWindow(hwnd(), SW_SHOWNORMAL);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 210 }
216 211
217 void RootWindowHostWin::OnCursorVisibilityChanged(bool show) { 212 void RootWindowHostWin::OnCursorVisibilityChanged(bool show) {
218 NOTIMPLEMENTED(); 213 NOTIMPLEMENTED();
219 } 214 }
220 215
221 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) { 216 void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
222 // Deliberately not implemented. 217 // Deliberately not implemented.
223 } 218 }
224 219
225 void RootWindowHostWin::SetFocusWhenShown(bool focus_when_shown) {
226 NOTIMPLEMENTED();
227 }
228
229 void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) { 220 void RootWindowHostWin::PostNativeEvent(const base::NativeEvent& native_event) {
230 ::PostMessage( 221 ::PostMessage(
231 hwnd(), native_event.message, native_event.wParam, native_event.lParam); 222 hwnd(), native_event.message, native_event.wParam, native_event.lParam);
232 } 223 }
233 224
234 void RootWindowHostWin::OnDeviceScaleFactorChanged( 225 void RootWindowHostWin::OnDeviceScaleFactorChanged(
235 float device_scale_factor) { 226 float device_scale_factor) {
236 NOTIMPLEMENTED(); 227 NOTIMPLEMENTED();
237 } 228 }
238 229
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 namespace test { 300 namespace test {
310 301
311 // static 302 // static
312 void SetUsePopupAsRootWindowForTest(bool use) { 303 void SetUsePopupAsRootWindowForTest(bool use) {
313 use_popup_as_root_window_for_test = use; 304 use_popup_as_root_window_for_test = use;
314 } 305 }
315 306
316 } // namespace test 307 } // namespace test
317 308
318 } // namespace aura 309 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_win.h ('k') | ui/aura/root_window_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698