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

Side by Side Diff: chrome/browser/ui/extensions/extension_installed_bubble.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_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const extensions::Extension* extension() const { return extension_; } 72 const extensions::Extension* extension() const { return extension_; }
73 Browser* browser() { return browser_; } 73 Browser* browser() { return browser_; }
74 const Browser* browser() const { return browser_; } 74 const Browser* browser() const { return browser_; }
75 const SkBitmap& icon() const { return icon_; } 75 const SkBitmap& icon() const { return icon_; }
76 BubbleType type() const { return type_; } 76 BubbleType type() const { return type_; }
77 bool has_command_keybinding() const { return !!action_command_; } 77 bool has_command_keybinding() const { return !!action_command_; }
78 int options() const { return options_; } 78 int options() const { return options_; }
79 AnchorPosition anchor_position() const { return anchor_position_; } 79 AnchorPosition anchor_position() const { return anchor_position_; }
80 80
81 // BubbleDelegate: 81 // BubbleDelegate:
82 scoped_ptr<BubbleUi> BuildBubbleUi() override; 82 std::unique_ptr<BubbleUi> BuildBubbleUi() override;
83 bool ShouldClose(BubbleCloseReason reason) const override; 83 bool ShouldClose(BubbleCloseReason reason) const override;
84 std::string GetName() const override; 84 std::string GetName() const override;
85 const content::RenderFrameHost* OwningFrame() const override; 85 const content::RenderFrameHost* OwningFrame() const override;
86 86
87 // Returns false if the bubble could not be shown immediately, because of an 87 // Returns false if the bubble could not be shown immediately, because of an
88 // animation (eg. adding a new browser action to the toolbar). 88 // animation (eg. adding a new browser action to the toolbar).
89 // TODO(hcarmona): Detect animation in a platform-agnostic manner. 89 // TODO(hcarmona): Detect animation in a platform-agnostic manner.
90 bool ShouldShow(); 90 bool ShouldShow();
91 91
92 // Returns the string describing how to use the new extension. 92 // Returns the string describing how to use the new extension.
93 base::string16 GetHowToUseDescription() const; 93 base::string16 GetHowToUseDescription() const;
94 94
95 // Handle initialization with the extension. 95 // Handle initialization with the extension.
96 void Initialize(); 96 void Initialize();
97 97
98 private: 98 private:
99 // |extension_| is NULL when we are deleted. 99 // |extension_| is NULL when we are deleted.
100 const extensions::Extension* extension_; 100 const extensions::Extension* extension_;
101 Browser* browser_; 101 Browser* browser_;
102 const SkBitmap icon_; 102 const SkBitmap icon_;
103 BubbleType type_; 103 BubbleType type_;
104 104
105 // A bitmask containing the various options of bubble sections to show. 105 // A bitmask containing the various options of bubble sections to show.
106 int options_; 106 int options_;
107 107
108 // The location where the bubble should be anchored. 108 // The location where the bubble should be anchored.
109 AnchorPosition anchor_position_; 109 AnchorPosition anchor_position_;
110 110
111 // The command to execute the extension action, if one exists. 111 // The command to execute the extension action, if one exists.
112 scoped_ptr<extensions::Command> action_command_; 112 std::unique_ptr<extensions::Command> action_command_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble); 114 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledBubble);
115 }; 115 };
116 116
117 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_ 117 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_BUBBLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698