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

Side by Side Diff: chrome/browser/ui/sad_tab_helper.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SAD_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_UI_SAD_TAB_HELPER_H_
6 #define CHROME_BROWSER_UI_SAD_TAB_HELPER_H_ 6 #define CHROME_BROWSER_UI_SAD_TAB_HELPER_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
12 #include "content/public/browser/web_contents_user_data.h" 13 #include "content/public/browser/web_contents_user_data.h"
13 14
14 namespace chrome { 15 namespace chrome {
15 class SadTab; 16 class SadTab;
16 } 17 }
17 18
18 // Per-tab class to manage sad tab views. 19 // Per-tab class to manage sad tab views.
19 class SadTabHelper : public content::WebContentsObserver, 20 class SadTabHelper : public content::WebContentsObserver,
20 public content::WebContentsUserData<SadTabHelper> { 21 public content::WebContentsUserData<SadTabHelper> {
21 public: 22 public:
22 ~SadTabHelper() override; 23 ~SadTabHelper() override;
23 24
24 chrome::SadTab* sad_tab() { return sad_tab_.get(); } 25 chrome::SadTab* sad_tab() { return sad_tab_.get(); }
25 26
26 private: 27 private:
27 friend class content::WebContentsUserData<SadTabHelper>; 28 friend class content::WebContentsUserData<SadTabHelper>;
28 29
29 explicit SadTabHelper(content::WebContents* web_contents); 30 explicit SadTabHelper(content::WebContents* web_contents);
30 31
31 void InstallSadTab(base::TerminationStatus status); 32 void InstallSadTab(base::TerminationStatus status);
32 33
33 // Overridden from content::WebContentsObserver: 34 // Overridden from content::WebContentsObserver:
34 void RenderViewReady() override; 35 void RenderViewReady() override;
35 void RenderProcessGone(base::TerminationStatus status) override; 36 void RenderProcessGone(base::TerminationStatus status) override;
36 37
37 scoped_ptr<chrome::SadTab> sad_tab_; 38 std::unique_ptr<chrome::SadTab> sad_tab_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(SadTabHelper); 40 DISALLOW_COPY_AND_ASSIGN(SadTabHelper);
40 }; 41 };
41 42
42 #endif // CHROME_BROWSER_UI_SAD_TAB_HELPER_H_ 43 #endif // CHROME_BROWSER_UI_SAD_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.h ('k') | chrome/browser/ui/screen_capture_notification_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698