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

Unified Diff: components/sad_tab/views/sad_tab_view.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 side-by-side diff with in-line comments
Download patch
Index: components/sad_tab/views/sad_tab_view.h
diff --git a/chrome/browser/ui/views/sad_tab_view.h b/components/sad_tab/views/sad_tab_view.h
similarity index 79%
rename from chrome/browser/ui/views/sad_tab_view.h
rename to components/sad_tab/views/sad_tab_view.h
index afb893a02949ba003647ab2d0ef75df95778871b..eb992bc46e7b11721b6d0de2b1418e5fe97a9b08 100644
--- a/chrome/browser/ui/views/sad_tab_view.h
+++ b/components/sad_tab/views/sad_tab_view.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_
-#define CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H_
+#ifndef COMPONENTS_SAD_TAB_VIEWS_SAD_TAB_VIEW_H_
+#define COMPONENTS_SAD_TAB_VIEWS_SAD_TAB_VIEW_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/ui/sad_tab.h"
+#include "components/sad_tab/sad_tab.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/link_listener.h"
#include "ui/views/view.h"
@@ -21,6 +21,8 @@ class Label;
class LabelButton;
}
+namespace sad_tab {
+
///////////////////////////////////////////////////////////////////////////////
//
// SadTabView
@@ -29,12 +31,14 @@ class LabelButton;
// "sad tab" in the browser window when a renderer is destroyed unnaturally.
//
///////////////////////////////////////////////////////////////////////////////
-class SadTabView : public chrome::SadTab,
+class SadTabView : public SadTab,
public views::View,
public views::LinkListener,
public views::ButtonListener {
public:
- SadTabView(content::WebContents* web_contents, chrome::SadTabKind kind);
+ SadTabView(content::WebContents* web_contents,
+ SadTabKind kind,
+ SadTabClient* client);
virtual ~SadTabView();
// Overridden from views::View:
@@ -52,7 +56,7 @@ class SadTabView : public chrome::SadTab,
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
private:
- // Overridden from chrome::SadTab:
+ // Overridden from SadTab:
virtual void Show() OVERRIDE;
virtual void Close() OVERRIDE;
@@ -60,7 +64,8 @@ class SadTabView : public chrome::SadTab,
views::Link* CreateLink(const base::string16& text);
content::WebContents* web_contents_;
- chrome::SadTabKind kind_;
+ SadTabKind kind_;
+ SadTabClient* client_;
bool painted_;
views::Label* message_;
views::Link* help_link_;
@@ -70,4 +75,6 @@ class SadTabView : public chrome::SadTab,
DISALLOW_COPY_AND_ASSIGN(SadTabView);
};
-#endif // CHROME_BROWSER_UI_VIEWS_SAD_TAB_VIEW_H__
+} // namespace sad_tab
+
+#endif // COMPONENTS_SAD_TAB_VIEWS_SAD_TAB_VIEW_H__

Powered by Google App Engine
This is Rietveld 408576698