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

Side by Side Diff: ui/aura/root_window_host_mac.mm

Issue 126513004: Rename RootWindowHost to WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window_host_mac.h ('k') | ui/aura/root_window_host_ozone.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 <Cocoa/Cocoa.h> 5 #include <Cocoa/Cocoa.h>
6 6
7 #include "ui/aura/root_window_host_mac.h" 7 #include "ui/aura/root_window_host_mac.h"
8 #include "ui/aura/window_tree_host.h" 8 #include "ui/aura/window_tree_host.h"
9 #include "ui/aura/window_tree_host_delegate.h" 9 #include "ui/aura/window_tree_host_delegate.h"
10 10
11 namespace aura { 11 namespace aura {
12 12
13 RootWindowHostMac::RootWindowHostMac(const gfx::Rect& bounds) { 13 WindowTreeHostMac::WindowTreeHostMac(const gfx::Rect& bounds) {
14 window_.reset( 14 window_.reset(
15 [[NSWindow alloc] 15 [[NSWindow alloc]
16 initWithContentRect:NSRectFromCGRect(bounds.ToCGRect()) 16 initWithContentRect:NSRectFromCGRect(bounds.ToCGRect())
17 styleMask:NSBorderlessWindowMask 17 styleMask:NSBorderlessWindowMask
18 backing:NSBackingStoreBuffered 18 backing:NSBackingStoreBuffered
19 defer:NO]); 19 defer:NO]);
20 CreateCompositor(GetAcceleratedWidget()); 20 CreateCompositor(GetAcceleratedWidget());
21 } 21 }
22 22
23 RootWindowHostMac::~RootWindowHostMac() { 23 WindowTreeHostMac::~WindowTreeHostMac() {
24 } 24 }
25 25
26 RootWindow* RootWindowHostMac::GetRootWindow() { 26 RootWindow* WindowTreeHostMac::GetRootWindow() {
27 return delegate_->AsRootWindow(); 27 return delegate_->AsRootWindow();
28 } 28 }
29 29
30 gfx::AcceleratedWidget RootWindowHostMac::GetAcceleratedWidget() { 30 gfx::AcceleratedWidget WindowTreeHostMac::GetAcceleratedWidget() {
31 return [window_ contentView]; 31 return [window_ contentView];
32 } 32 }
33 void RootWindowHostMac::Show() { 33 void WindowTreeHostMac::Show() {
34 [window_ makeKeyAndOrderFront:nil]; 34 [window_ makeKeyAndOrderFront:nil];
35 } 35 }
36 36
37 void RootWindowHostMac::Hide() { 37 void WindowTreeHostMac::Hide() {
38 [window_ orderOut:nil]; 38 [window_ orderOut:nil];
39 } 39 }
40 40
41 void RootWindowHostMac::ToggleFullScreen() { 41 void WindowTreeHostMac::ToggleFullScreen() {
42 } 42 }
43 43
44 gfx::Rect RootWindowHostMac::GetBounds() const { 44 gfx::Rect WindowTreeHostMac::GetBounds() const {
45 return gfx::Rect(NSRectToCGRect([window_ frame])); 45 return gfx::Rect(NSRectToCGRect([window_ frame]));
46 } 46 }
47 47
48 void RootWindowHostMac::SetBounds(const gfx::Rect& bounds) { 48 void WindowTreeHostMac::SetBounds(const gfx::Rect& bounds) {
49 [window_ setFrame:NSRectFromCGRect(bounds.ToCGRect()) display:YES animate:NO]; 49 [window_ setFrame:NSRectFromCGRect(bounds.ToCGRect()) display:YES animate:NO];
50 } 50 }
51 51
52 gfx::Insets RootWindowHostMac::GetInsets() const { 52 gfx::Insets WindowTreeHostMac::GetInsets() const {
53 NOTIMPLEMENTED(); 53 NOTIMPLEMENTED();
54 return gfx::Insets(); 54 return gfx::Insets();
55 } 55 }
56 56
57 void RootWindowHostMac::SetInsets(const gfx::Insets& insets) { 57 void WindowTreeHostMac::SetInsets(const gfx::Insets& insets) {
58 NOTIMPLEMENTED(); 58 NOTIMPLEMENTED();
59 } 59 }
60 60
61 gfx::Point RootWindowHostMac::GetLocationOnNativeScreen() const { 61 gfx::Point WindowTreeHostMac::GetLocationOnNativeScreen() const {
62 NOTIMPLEMENTED(); 62 NOTIMPLEMENTED();
63 return gfx::Point(0, 0); 63 return gfx::Point(0, 0);
64 } 64 }
65 65
66 void RootWindowHostMac::SetCapture() { 66 void WindowTreeHostMac::SetCapture() {
67 NOTIMPLEMENTED(); 67 NOTIMPLEMENTED();
68 } 68 }
69 69
70 void RootWindowHostMac::ReleaseCapture() { 70 void WindowTreeHostMac::ReleaseCapture() {
71 NOTIMPLEMENTED(); 71 NOTIMPLEMENTED();
72 } 72 }
73 73
74 void RootWindowHostMac::SetCursor(gfx::NativeCursor cursor_type) { 74 void WindowTreeHostMac::SetCursor(gfx::NativeCursor cursor_type) {
75 NOTIMPLEMENTED(); 75 NOTIMPLEMENTED();
76 } 76 }
77 77
78 bool RootWindowHostMac::QueryMouseLocation(gfx::Point* location_return) { 78 bool WindowTreeHostMac::QueryMouseLocation(gfx::Point* location_return) {
79 NOTIMPLEMENTED(); 79 NOTIMPLEMENTED();
80 return false; 80 return false;
81 } 81 }
82 82
83 bool RootWindowHostMac::ConfineCursorToRootWindow() { 83 bool WindowTreeHostMac::ConfineCursorToRootWindow() {
84 return false; 84 return false;
85 } 85 }
86 86
87 void RootWindowHostMac::UnConfineCursor() { 87 void WindowTreeHostMac::UnConfineCursor() {
88 NOTIMPLEMENTED(); 88 NOTIMPLEMENTED();
89 } 89 }
90 90
91 void RootWindowHostMac::OnCursorVisibilityChanged(bool show) { 91 void WindowTreeHostMac::OnCursorVisibilityChanged(bool show) {
92 NOTIMPLEMENTED(); 92 NOTIMPLEMENTED();
93 } 93 }
94 94
95 void RootWindowHostMac::MoveCursorTo(const gfx::Point& location) { 95 void WindowTreeHostMac::MoveCursorTo(const gfx::Point& location) {
96 NOTIMPLEMENTED(); 96 NOTIMPLEMENTED();
97 } 97 }
98 98
99 void RootWindowHostMac::PostNativeEvent(const base::NativeEvent& event) { 99 void WindowTreeHostMac::PostNativeEvent(const base::NativeEvent& event) {
100 NOTIMPLEMENTED(); 100 NOTIMPLEMENTED();
101 } 101 }
102 102
103 void RootWindowHostMac::OnDeviceScaleFactorChanged(float device_scale_factor) { 103 void WindowTreeHostMac::OnDeviceScaleFactorChanged(float device_scale_factor) {
104 NOTIMPLEMENTED(); 104 NOTIMPLEMENTED();
105 } 105 }
106 106
107 void RootWindowHostMac::PrepareForShutdown() { 107 void WindowTreeHostMac::PrepareForShutdown() {
108 NOTIMPLEMENTED(); 108 NOTIMPLEMENTED();
109 } 109 }
110 110
111 // static 111 // static
112 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { 112 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
113 return new RootWindowHostMac(bounds); 113 return new WindowTreeHostMac(bounds);
114 } 114 }
115 115
116 // static 116 // static
117 gfx::Size RootWindowHost::GetNativeScreenSize() { 117 gfx::Size WindowTreeHost::GetNativeScreenSize() {
118 NOTIMPLEMENTED(); 118 NOTIMPLEMENTED();
119 return gfx::Size(1024, 768); 119 return gfx::Size(1024, 768);
120 } 120 }
121 121
122 } // namespace aura 122 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_mac.h ('k') | ui/aura/root_window_host_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698