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

Side by Side Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9
10 #include <memory>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/mac/scoped_nsobject.h" 13 #include "base/mac/scoped_nsobject.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 #include "extensions/browser/app_window/app_window.h" 16 #include "extensions/browser/app_window/app_window.h"
16 #include "extensions/browser/app_window/native_app_window.h" 17 #include "extensions/browser/app_window/native_app_window.h"
17 #include "extensions/browser/app_window/size_constraints.h" 18 #include "extensions/browser/app_window/size_constraints.h"
18 #include "extensions/common/draggable_region.h" 19 #include "extensions/common/draggable_region.h"
19 #include "ui/base/accelerators/accelerator_manager.h" 20 #include "ui/base/accelerators/accelerator_manager.h"
20 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
21 22
22 @class AppNSWindow; 23 @class AppNSWindow;
23 class ExtensionKeybindingRegistryCocoa; 24 class ExtensionKeybindingRegistryCocoa;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 bool IsWithinDraggableRegion(NSPoint point) const; 122 bool IsWithinDraggableRegion(NSPoint point) const;
122 123
123 NSRect restored_bounds() const { return restored_bounds_; } 124 NSRect restored_bounds() const { return restored_bounds_; }
124 125
125 protected: 126 protected:
126 // NativeAppWindow implementation. 127 // NativeAppWindow implementation.
127 void SetFullscreen(int fullscreen_types) override; 128 void SetFullscreen(int fullscreen_types) override;
128 bool IsFullscreenOrPending() const override; 129 bool IsFullscreenOrPending() const override;
129 void UpdateWindowIcon() override; 130 void UpdateWindowIcon() override;
130 void UpdateWindowTitle() override; 131 void UpdateWindowTitle() override;
131 void UpdateShape(scoped_ptr<SkRegion> region) override; 132 void UpdateShape(std::unique_ptr<SkRegion> region) override;
132 void UpdateDraggableRegions( 133 void UpdateDraggableRegions(
133 const std::vector<extensions::DraggableRegion>& regions) override; 134 const std::vector<extensions::DraggableRegion>& regions) override;
134 SkRegion* GetDraggableRegion() override; 135 SkRegion* GetDraggableRegion() override;
135 void HandleKeyboardEvent( 136 void HandleKeyboardEvent(
136 const content::NativeWebKeyboardEvent& event) override; 137 const content::NativeWebKeyboardEvent& event) override;
137 bool IsFrameless() const override; 138 bool IsFrameless() const override;
138 bool HasFrameColor() const override; 139 bool HasFrameColor() const override;
139 SkColor ActiveFrameColor() const override; 140 SkColor ActiveFrameColor() const override;
140 SkColor InactiveFrameColor() const override; 141 SkColor InactiveFrameColor() const override;
141 gfx::Insets GetFrameInsets() const override; 142 gfx::Insets GetFrameInsets() const override;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 SkColor inactive_frame_color_; 208 SkColor inactive_frame_color_;
208 209
209 base::scoped_nsobject<NativeAppWindowController> window_controller_; 210 base::scoped_nsobject<NativeAppWindowController> window_controller_;
210 211
211 // For system drag, the whole window is draggable and the non-draggable areas 212 // For system drag, the whole window is draggable and the non-draggable areas
212 // have to been explicitly excluded. 213 // have to been explicitly excluded.
213 std::vector<extensions::DraggableRegion> draggable_regions_; 214 std::vector<extensions::DraggableRegion> draggable_regions_;
214 215
215 // The Extension Command Registry used to determine which keyboard events to 216 // The Extension Command Registry used to determine which keyboard events to
216 // handle. 217 // handle.
217 scoped_ptr<ExtensionKeybindingRegistryCocoa> extension_keybinding_registry_; 218 std::unique_ptr<ExtensionKeybindingRegistryCocoa>
219 extension_keybinding_registry_;
218 220
219 // Tracks the last time the extension asked the window to activate. 221 // Tracks the last time the extension asked the window to activate.
220 base::Time last_activate_; 222 base::Time last_activate_;
221 223
222 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa); 224 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoa);
223 }; 225 };
224 226
225 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_ 227 #endif // CHROME_BROWSER_UI_COCOA_APPS_NATIVE_APP_WINDOW_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/applescript/window_applescript.mm ('k') | chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698