Index: components/sad_tab/sad_tab_helper.h |
diff --git a/chrome/browser/ui/sad_tab_helper.h b/components/sad_tab/sad_tab_helper.h |
similarity index 63% |
rename from chrome/browser/ui/sad_tab_helper.h |
rename to components/sad_tab/sad_tab_helper.h |
index f61da72e28b0b660c4758e0f8708596591534d0c..5926de4e506e24b1ef7be2e6cab3222140343d7e 100644 |
--- a/chrome/browser/ui/sad_tab_helper.h |
+++ b/components/sad_tab/sad_tab_helper.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_SAD_TAB_HELPER_H_ |
-#define CHROME_BROWSER_UI_SAD_TAB_HELPER_H_ |
+#ifndef COMPONENTS_SAD_TAB_SAD_TAB_HELPER_H_ |
+#define COMPONENTS_SAD_TAB_SAD_TAB_HELPER_H_ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
@@ -11,22 +11,28 @@ |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/browser/web_contents_user_data.h" |
-namespace chrome { |
+namespace sad_tab { |
+ |
class SadTab; |
-} |
+class SadTabClient; |
// Per-tab class to manage sad tab views. |
class SadTabHelper : public content::WebContentsObserver, |
public content::WebContentsUserData<SadTabHelper> { |
public: |
+ static void CreateForWebContentsWithClient( |
+ content::WebContents* contents, |
+ scoped_ptr<SadTabClient> client); |
+ |
virtual ~SadTabHelper(); |
- chrome::SadTab* sad_tab() { return sad_tab_.get(); } |
+ SadTab* sad_tab() { return sad_tab_.get(); } |
private: |
friend class content::WebContentsUserData<SadTabHelper>; |
- explicit SadTabHelper(content::WebContents* web_contents); |
+ SadTabHelper(content::WebContents* web_contents, |
+ scoped_ptr<SadTabClient> client); |
void InstallSadTab(base::TerminationStatus status); |
@@ -34,9 +40,12 @@ class SadTabHelper : public content::WebContentsObserver, |
virtual void RenderViewReady() OVERRIDE; |
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; |
- scoped_ptr<chrome::SadTab> sad_tab_; |
+ scoped_ptr<SadTabClient> client_; |
+ scoped_ptr<SadTab> sad_tab_; |
DISALLOW_COPY_AND_ASSIGN(SadTabHelper); |
}; |
-#endif // CHROME_BROWSER_UI_SAD_TAB_HELPER_H_ |
+} // namespace sad_tab |
+ |
+#endif // COMPONENTS_SAD_TAB_SAD_TAB_HELPER_H_ |