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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.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 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 CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "extensions/components/native_app_window/native_app_window_views.h" 11 #include "extensions/components/native_app_window/native_app_window_views.h"
11 12
12 namespace apps { 13 namespace apps {
13 class AppWindowFrameView; 14 class AppWindowFrameView;
14 } 15 }
15 16
16 class ExtensionKeybindingRegistryViews; 17 class ExtensionKeybindingRegistryViews;
17 18
18 class ChromeNativeAppWindowViews 19 class ChromeNativeAppWindowViews
19 : public native_app_window::NativeAppWindowViews { 20 : public native_app_window::NativeAppWindowViews {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool WidgetHasHitTestMask() const override; 57 bool WidgetHasHitTestMask() const override;
57 void GetWidgetHitTestMask(gfx::Path* mask) const override; 58 void GetWidgetHitTestMask(gfx::Path* mask) const override;
58 59
59 // views::View implementation. 60 // views::View implementation.
60 gfx::Size GetPreferredSize() const override; 61 gfx::Size GetPreferredSize() const override;
61 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 62 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
62 63
63 // NativeAppWindow implementation. 64 // NativeAppWindow implementation.
64 void SetFullscreen(int fullscreen_types) override; 65 void SetFullscreen(int fullscreen_types) override;
65 bool IsFullscreenOrPending() const override; 66 bool IsFullscreenOrPending() const override;
66 void UpdateShape(scoped_ptr<SkRegion> region) override; 67 void UpdateShape(std::unique_ptr<SkRegion> region) override;
67 bool HasFrameColor() const override; 68 bool HasFrameColor() const override;
68 SkColor ActiveFrameColor() const override; 69 SkColor ActiveFrameColor() const override;
69 SkColor InactiveFrameColor() const override; 70 SkColor InactiveFrameColor() const override;
70 71
71 // NativeAppWindowViews implementation. 72 // NativeAppWindowViews implementation.
72 void InitializeWindow( 73 void InitializeWindow(
73 extensions::AppWindow* app_window, 74 extensions::AppWindow* app_window,
74 const extensions::AppWindow::CreateParams& create_params) override; 75 const extensions::AppWindow::CreateParams& create_params) override;
75 76
76 private: 77 private:
77 // Custom shape of the window. If this is not set then the window has a 78 // Custom shape of the window. If this is not set then the window has a
78 // default shape, usually rectangular. 79 // default shape, usually rectangular.
79 scoped_ptr<SkRegion> shape_; 80 std::unique_ptr<SkRegion> shape_;
80 81
81 bool has_frame_color_; 82 bool has_frame_color_;
82 SkColor active_frame_color_; 83 SkColor active_frame_color_;
83 SkColor inactive_frame_color_; 84 SkColor inactive_frame_color_;
84 gfx::Size preferred_size_; 85 gfx::Size preferred_size_;
85 86
86 // The class that registers for keyboard shortcuts for extension commands. 87 // The class that registers for keyboard shortcuts for extension commands.
87 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; 88 std::unique_ptr<ExtensionKeybindingRegistryViews>
89 extension_keybinding_registry_;
88 90
89 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); 91 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews);
90 }; 92 };
91 93
92 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ 94 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698