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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_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_APP_LIST_APP_LIST_SERVICE_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_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 "chrome/browser/ui/app_list/app_list_service_impl.h" 11 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
11 #include "chrome/browser/ui/app_list/app_list_shower_delegate.h" 12 #include "chrome/browser/ui/app_list/app_list_shower_delegate.h"
12 #include "chrome/browser/ui/app_list/app_list_shower_views.h" 13 #include "chrome/browser/ui/app_list/app_list_shower_views.h"
13 #include "ui/app_list/app_list_model.h" 14 #include "ui/app_list/app_list_model.h"
14 15
15 class AppListControllerDelegate; 16 class AppListControllerDelegate;
16 17
17 // AppListServiceViews manages a desktop app list that uses toolkit-views. 18 // AppListServiceViews manages a desktop app list that uses toolkit-views.
18 class AppListServiceViews : public AppListServiceImpl, 19 class AppListServiceViews : public AppListServiceImpl,
19 public AppListShowerDelegate { 20 public AppListShowerDelegate {
20 public: 21 public:
21 explicit AppListServiceViews( 22 explicit AppListServiceViews(
22 scoped_ptr<AppListControllerDelegate> controller_delegate); 23 std::unique_ptr<AppListControllerDelegate> controller_delegate);
23 ~AppListServiceViews() override; 24 ~AppListServiceViews() override;
24 25
25 // Set |can_dismiss| to prevent the app list dismissing when losing focus. For 26 // Set |can_dismiss| to prevent the app list dismissing when losing focus. For
26 // example, while showing a window-modal dialog. 27 // example, while showing a window-modal dialog.
27 void set_can_dismiss(bool can_dismiss) { can_dismiss_ = can_dismiss; } 28 void set_can_dismiss(bool can_dismiss) { can_dismiss_ = can_dismiss; }
28 29
29 AppListShower& shower() { return shower_; } 30 AppListShower& shower() { return shower_; }
30 31
31 // Called by the AppListControllerDelegate when it is told that the app list 32 // Called by the AppListControllerDelegate when it is told that the app list
32 // view must be destroyed. 33 // view must be destroyed.
(...skipping 23 matching lines...) Expand all
56 private: 57 private:
57 // Switches to |state|, unless it is |INVALID_STATE| (in which case, opens on 58 // Switches to |state|, unless it is |INVALID_STATE| (in which case, opens on
58 // the default state). 59 // the default state).
59 void ShowForProfileInternal(Profile* profile, 60 void ShowForProfileInternal(Profile* profile,
60 app_list::AppListModel::State state); 61 app_list::AppListModel::State state);
61 62
62 // Responsible for creating the app list and responding to profile changes. 63 // Responsible for creating the app list and responding to profile changes.
63 AppListShower shower_; 64 AppListShower shower_;
64 65
65 bool can_dismiss_; 66 bool can_dismiss_;
66 scoped_ptr<AppListControllerDelegate> controller_delegate_; 67 std::unique_ptr<AppListControllerDelegate> controller_delegate_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(AppListServiceViews); 69 DISALLOW_COPY_AND_ASSIGN(AppListServiceViews);
69 }; 70 };
70 71
71 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_ 72 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_unittest.cc ('k') | chrome/browser/ui/app_list/app_list_service_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698