OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/chrome_sad_tab_client.h" |
| 6 |
| 7 #include "chrome/browser/browser_shutdown.h" |
| 8 #include "chrome/browser/ui/browser_finder.h" |
| 9 #include "chrome/browser/ui/chrome_pages.h" |
| 10 |
| 11 #if !defined(OS_MACOSX) |
| 12 #include "components/sad_tab/views/sad_tab_view.h" |
| 13 #endif |
| 14 |
| 15 ChromeSadTabClient::ChromeSadTabClient() { |
| 16 } |
| 17 |
| 18 ChromeSadTabClient::~ChromeSadTabClient() { |
| 19 } |
| 20 |
| 21 #if !defined(OS_MACOSX) |
| 22 scoped_ptr<sad_tab::SadTab> ChromeSadTabClient::CreateSadTab( |
| 23 content::WebContents* web_contents, |
| 24 sad_tab::SadTabKind kind) { |
| 25 return scoped_ptr<sad_tab::SadTab>( |
| 26 new sad_tab::SadTabView(web_contents, kind, this)); |
| 27 } |
| 28 #endif |
| 29 |
| 30 bool ChromeSadTabClient::IsInBrowserShutdown() { |
| 31 return browser_shutdown::GetShutdownType() != browser_shutdown::NOT_VALID; |
| 32 } |
| 33 |
| 34 void ChromeSadTabClient::ShowFeedbackPage( |
| 35 content::WebContents* web_contents, |
| 36 const std::string& description_template, |
| 37 const std::string& category_tag) { |
| 38 chrome::ShowFeedbackPage( |
| 39 chrome::FindBrowserWithWebContents(web_contents), |
| 40 description_template, |
| 41 category_tag); |
| 42 } |
OLD | NEW |