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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu_button.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/app_menu_button.h
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.h b/chrome/browser/ui/views/toolbar/app_menu_button.h
index 21bffcb4a6083be7d6e40a0df1d3f68bc54d37c0..b70c0bfde47bd6511a84e8be9c15b56a4a68ddff 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.h
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.h
@@ -5,8 +5,9 @@
#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_
#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/toolbar/app_menu_icon_painter.h"
#include "ui/views/controls/button/menu_button.h"
@@ -71,7 +72,8 @@ class AppMenuButton : public views::MenuButton,
private:
// views::MenuButton:
const char* GetClassName() const override;
- scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override;
+ std::unique_ptr<views::LabelButtonBorder> CreateDefaultBorder()
+ const override;
gfx::Rect GetThemePaintRect() const override;
bool GetDropFormats(
int* formats,
@@ -85,7 +87,7 @@ class AppMenuButton : public views::MenuButton,
void OnPaint(gfx::Canvas* canvas) override;
// Only used in pre-MD.
- scoped_ptr<AppMenuIconPainter> icon_painter_;
+ std::unique_ptr<AppMenuIconPainter> icon_painter_;
// Only used in MD.
AppMenuIconPainter::Severity severity_;
@@ -103,16 +105,15 @@ class AppMenuButton : public views::MenuButton,
// App model and menu.
// Note that the menu should be destroyed before the model it uses, so the
// menu should be listed later.
- scoped_ptr<AppMenuModel> menu_model_;
- scoped_ptr<AppMenu> menu_;
-
+ std::unique_ptr<AppMenuModel> menu_model_;
+ std::unique_ptr<AppMenu> menu_;
// Any trailing margin to be applied. Used when the browser is in
// a maximized state to extend to the full window width.
int margin_trailing_;
// Controls the visual feedback for the button state.
- scoped_ptr<views::InkDropDelegate> ink_drop_delegate_;
+ std::unique_ptr<views::InkDropDelegate> ink_drop_delegate_;
// Used to spawn weak pointers for delayed tasks to open the overflow menu.
base::WeakPtrFactory<AppMenuButton> weak_factory_;
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698