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

Side by Side Diff: components/sad_tab/sad_tab.h

Issue 543663002: Componentize sad_tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN Created 6 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_H_ 5 #ifndef COMPONENTS_SAD_TAB_SAD_TAB_H_
6 #define CHROME_BROWSER_UI_SAD_TAB_H_ 6 #define COMPONENTS_SAD_TAB_SAD_TAB_H_
7 7
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "chrome/browser/ui/sad_tab_types.h" 9 #include "components/sad_tab/sad_tab_types.h"
10 10
11 namespace content { 11 namespace content {
12 class WebContents; 12 class WebContents;
13 } 13 }
14 14
15 namespace chrome { 15 namespace sad_tab {
16
17 class SadTabClient;
16 18
17 // Cross-platform interface to show the Sad tab UI. 19 // Cross-platform interface to show the Sad tab UI.
18 class SadTab { 20 class SadTab {
19 public: 21 public:
20 // Factory function to create the platform specific implementations. 22 // Factory function to create the platform specific implementations.
21 static SadTab* Create(content::WebContents* web_contents, SadTabKind kind); 23 static SadTab* Create(content::WebContents* web_contents,
24 SadTabKind kind,
25 SadTabClient* client);
22 26
sadrul 2014/09/22 16:48:22 This doesn't seem to exist/be necessary in this pa
23 // Returns true if the sad tab should be shown. 27 // Returns true if the sad tab should be shown.
24 static bool ShouldShow(base::TerminationStatus status); 28 static bool ShouldShow(base::TerminationStatus status);
25 29
26 virtual ~SadTab() {} 30 virtual ~SadTab() {}
27 31
28 // Shows the Sad tab. 32 // Shows the Sad tab.
29 virtual void Show() = 0; 33 virtual void Show() = 0;
30 34
31 // Closes the Sad tab. 35 // Closes the Sad tab.
32 virtual void Close() = 0; 36 virtual void Close() = 0;
33 }; 37 };
34 38
35 } // namespace chrome 39 } // namespace sad_tab
36 40
37 #endif // CHROME_BROWSER_UI_SAD_TAB_H_ 41 #endif // COMPONENTS_SAD_TAB_SAD_TAB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698