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

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

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 years, 7 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/window_tree_host_mac.h ('k') | ui/aura/window_tree_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/window_tree_host_mac.h" 7 #include "ui/aura/window_tree_host_mac.h"
8 #include "ui/aura/window_tree_host.h" 8 #include "ui/aura/window_tree_host.h"
9 9
10 namespace aura { 10 namespace aura {
11 11
12 WindowTreeHostMac::WindowTreeHostMac(const gfx::Rect& bounds) { 12 WindowTreeHostMac::WindowTreeHostMac(const gfx::Rect& bounds,
13 ui::ContextFactory* context_factory) {
13 window_.reset( 14 window_.reset(
14 [[NSWindow alloc] 15 [[NSWindow alloc]
15 initWithContentRect:NSRectFromCGRect(bounds.ToCGRect()) 16 initWithContentRect:NSRectFromCGRect(bounds.ToCGRect())
16 styleMask:NSBorderlessWindowMask 17 styleMask:NSBorderlessWindowMask
17 backing:NSBackingStoreBuffered 18 backing:NSBackingStoreBuffered
18 defer:NO]); 19 defer:NO]);
19 CreateCompositor(GetAcceleratedWidget()); 20 CreateCompositor(GetAcceleratedWidget(), context_factory);
20 } 21 }
21 22
22 WindowTreeHostMac::~WindowTreeHostMac() { 23 WindowTreeHostMac::~WindowTreeHostMac() {
23 DestroyDispatcher(); 24 DestroyDispatcher();
24 } 25 }
25 26
26 EventSource* WindowTreeHostMac::GetEventSource() { 27 EventSource* WindowTreeHostMac::GetEventSource() {
27 NOTIMPLEMENTED(); 28 NOTIMPLEMENTED();
28 return nil; 29 return nil;
29 } 30 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 void WindowTreeHostMac::PostNativeEvent(const base::NativeEvent& event) { 96 void WindowTreeHostMac::PostNativeEvent(const base::NativeEvent& event) {
96 NOTIMPLEMENTED(); 97 NOTIMPLEMENTED();
97 } 98 }
98 99
99 void WindowTreeHostMac::OnDeviceScaleFactorChanged(float device_scale_factor) { 100 void WindowTreeHostMac::OnDeviceScaleFactorChanged(float device_scale_factor) {
100 NOTIMPLEMENTED(); 101 NOTIMPLEMENTED();
101 } 102 }
102 103
103 // static 104 // static
104 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { 105 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds,
105 return new WindowTreeHostMac(bounds); 106 ui::ContextFactory* context_factory) {
107 return new WindowTreeHostMac(bounds, context_factory);
106 } 108 }
107 109
108 // static 110 // static
109 gfx::Size WindowTreeHost::GetNativeScreenSize() { 111 gfx::Size WindowTreeHost::GetNativeScreenSize() {
110 NOTIMPLEMENTED(); 112 NOTIMPLEMENTED();
111 return gfx::Size(1024, 768); 113 return gfx::Size(1024, 768);
112 } 114 }
113 115
114 } // namespace aura 116 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_mac.h ('k') | ui/aura/window_tree_host_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698