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

Side by Side Diff: ui/views/cocoa/bridged_native_widget.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
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 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 5 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory>
10 #include <vector> 11 #include <vector>
11 12
12 #import "base/mac/scoped_nsobject.h" 13 #import "base/mac/scoped_nsobject.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #import "ui/accelerated_widget_mac/accelerated_widget_mac.h" 15 #import "ui/accelerated_widget_mac/accelerated_widget_mac.h"
16 #include "ui/base/ime/input_method_delegate.h" 16 #include "ui/base/ime/input_method_delegate.h"
17 #include "ui/compositor/layer_owner.h" 17 #include "ui/compositor/layer_owner.h"
18 #import "ui/views/cocoa/bridged_native_widget_owner.h" 18 #import "ui/views/cocoa/bridged_native_widget_owner.h"
19 #import "ui/views/cocoa/cocoa_mouse_capture_delegate.h" 19 #import "ui/views/cocoa/cocoa_mouse_capture_delegate.h"
20 #import "ui/views/focus/focus_manager.h" 20 #import "ui/views/focus/focus_manager.h"
21 #include "ui/views/views_export.h" 21 #include "ui/views/views_export.h"
22 #include "ui/views/widget/widget.h" 22 #include "ui/views/widget/widget.h"
23 23
24 @class BridgedContentView; 24 @class BridgedContentView;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // Overridden from BridgedNativeWidgetOwner: 253 // Overridden from BridgedNativeWidgetOwner:
254 NSWindow* GetNSWindow() override; 254 NSWindow* GetNSWindow() override;
255 gfx::Vector2d GetChildWindowOffset() const override; 255 gfx::Vector2d GetChildWindowOffset() const override;
256 bool IsVisibleParent() const override; 256 bool IsVisibleParent() const override;
257 void RemoveChildWindow(BridgedNativeWidget* child) override; 257 void RemoveChildWindow(BridgedNativeWidget* child) override;
258 258
259 views::NativeWidgetMac* native_widget_mac_; // Weak. Owns this. 259 views::NativeWidgetMac* native_widget_mac_; // Weak. Owns this.
260 base::scoped_nsobject<NSWindow> window_; 260 base::scoped_nsobject<NSWindow> window_;
261 base::scoped_nsobject<ViewsNSWindowDelegate> window_delegate_; 261 base::scoped_nsobject<ViewsNSWindowDelegate> window_delegate_;
262 base::scoped_nsobject<BridgedContentView> bridged_view_; 262 base::scoped_nsobject<BridgedContentView> bridged_view_;
263 scoped_ptr<ui::InputMethod> input_method_; 263 std::unique_ptr<ui::InputMethod> input_method_;
264 scoped_ptr<CocoaMouseCapture> mouse_capture_; 264 std::unique_ptr<CocoaMouseCapture> mouse_capture_;
265 scoped_ptr<TooltipManager> tooltip_manager_; 265 std::unique_ptr<TooltipManager> tooltip_manager_;
266 FocusManager* focus_manager_; // Weak. Owned by our Widget. 266 FocusManager* focus_manager_; // Weak. Owned by our Widget.
267 Widget::InitParams::Type widget_type_; 267 Widget::InitParams::Type widget_type_;
268 268
269 BridgedNativeWidgetOwner* parent_; // Weak. If non-null, owns this. 269 BridgedNativeWidgetOwner* parent_; // Weak. If non-null, owns this.
270 std::vector<BridgedNativeWidget*> child_windows_; 270 std::vector<BridgedNativeWidget*> child_windows_;
271 271
272 base::scoped_nsobject<NSView> compositor_superview_; 272 base::scoped_nsobject<NSView> compositor_superview_;
273 scoped_ptr<ui::AcceleratedWidgetMac> compositor_widget_; 273 std::unique_ptr<ui::AcceleratedWidgetMac> compositor_widget_;
274 scoped_ptr<ui::Compositor> compositor_; 274 std::unique_ptr<ui::Compositor> compositor_;
275 275
276 // Tracks the bounds when the window last started entering fullscreen. Used to 276 // Tracks the bounds when the window last started entering fullscreen. Used to
277 // provide an answer for GetRestoredBounds(), but not ever sent to Cocoa (it 277 // provide an answer for GetRestoredBounds(), but not ever sent to Cocoa (it
278 // has its own copy, but doesn't provide access to it). 278 // has its own copy, but doesn't provide access to it).
279 gfx::Rect bounds_before_fullscreen_; 279 gfx::Rect bounds_before_fullscreen_;
280 280
281 // Whether this window wants to be fullscreen. If a fullscreen animation is in 281 // Whether this window wants to be fullscreen. If a fullscreen animation is in
282 // progress then it might not be actually fullscreen. 282 // progress then it might not be actually fullscreen.
283 bool target_fullscreen_state_; 283 bool target_fullscreen_state_;
284 284
(...skipping 14 matching lines...) Expand all
299 bool invalidate_shadow_on_frame_swap_ = false; 299 bool invalidate_shadow_on_frame_swap_ = false;
300 300
301 AssociatedViews associated_views_; 301 AssociatedViews associated_views_;
302 302
303 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); 303 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget);
304 }; 304 };
305 305
306 } // namespace views 306 } // namespace views
307 307
308 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 308 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/button_drag_utils.cc ('k') | ui/views/cocoa/bridged_native_widget_interactive_uitest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698