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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 5 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
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_mac.h" 5 #include "ui/aura/root_window_host_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
11 #include "base/memory/scoped_nsobject.h" 11 #include "base/mac/scoped_nsobject.h"
12 #include "ui/aura/event.h" 12 #include "ui/aura/event.h"
13 #include "ui/aura/root_window.h" 13 #include "ui/aura/root_window.h"
14 #include "ui/aura/root_window_host.h" 14 #include "ui/aura/root_window_host.h"
15 #include "ui/aura/root_window_mac.h" 15 #include "ui/aura/root_window_mac.h"
16 #include "ui/aura/root_window_view_mac.h" 16 #include "ui/aura/root_window_view_mac.h"
17 #include "ui/base/events/event_utils.h" 17 #include "ui/base/events/event_utils.h"
18 #include "ui/gfx/point.h" 18 #include "ui/gfx/point.h"
19 19
20 namespace aura { 20 namespace aura {
21 21
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 private: 60 private:
61 // Weak reference. 61 // Weak reference.
62 RootWindow* root_window_; 62 RootWindow* root_window_;
63 63
64 // The bounds of the Aura desktop. Relative to Aura's coordinate system. 64 // The bounds of the Aura desktop. Relative to Aura's coordinate system.
65 // This is currently used only for size information, not location. 65 // This is currently used only for size information, not location.
66 gfx::Rect bounds_; 66 gfx::Rect bounds_;
67 67
68 // An NSWindowController for the root window. Controls the actual Cocoa 68 // An NSWindowController for the root window. Controls the actual Cocoa
69 // window on Mac. 69 // window on Mac.
70 scoped_nsobject<NSWindowController> controller_; 70 base::scoped_nsobject<NSWindowController> controller_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(RootWindowHostMac); 72 DISALLOW_COPY_AND_ASSIGN(RootWindowHostMac);
73 }; 73 };
74 74
75 RootWindowHostMacDelegate::RootWindowHostMacDelegate() { 75 RootWindowHostMacDelegate::RootWindowHostMacDelegate() {
76 } 76 }
77 77
78 RootWindowHostMacDelegate::~RootWindowHostMacDelegate() { 78 RootWindowHostMacDelegate::~RootWindowHostMacDelegate() {
79 } 79 }
80 80
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 void RootWindowHostMac::SetLocation(const gfx::Rect& bounds) { 210 void RootWindowHostMac::SetLocation(const gfx::Rect& bounds) {
211 NSRect screen = [[NSScreen mainScreen] visibleFrame]; 211 NSRect screen = [[NSScreen mainScreen] visibleFrame];
212 NSPoint origin = NSMakePoint(screen.origin.x + bounds.x(), 212 NSPoint origin = NSMakePoint(screen.origin.x + bounds.x(),
213 screen.origin.y + screen.size.height - 213 screen.origin.y + screen.size.height -
214 bounds.y() - bounds.height()); 214 bounds.y() - bounds.height());
215 [[controller_ window] setFrameOrigin:origin]; 215 [[controller_ window] setFrameOrigin:origin];
216 } 216 }
217 217
218 } // namespace aura 218 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698