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 #include "grit/theme_resources.h" | |
11 #include "ui/base/resource/resource_bundle.h" | |
12 | |
13 ChromeSadTabClient::ChromeSadTabClient() { | |
14 } | |
15 | |
16 ChromeSadTabClient::~ChromeSadTabClient() { | |
17 } | |
18 | |
19 bool ChromeSadTabClient::IsInBrowserShutdown() { | |
20 return browser_shutdown::GetShutdownType() != browser_shutdown::NOT_VALID; | |
21 } | |
22 | |
23 void ChromeSadTabClient::ShowFeedbackPage( | |
24 content::WebContents* web_contents, | |
25 const std::string& description_template, | |
26 const std::string& category_tag) { | |
27 chrome::ShowFeedbackPage( | |
28 chrome::FindBrowserWithWebContents(web_contents), | |
29 description_template, | |
30 category_tag); | |
31 } | |
32 | |
33 gfx::ImageSkia* ChromeSadTabClient::GetImageForKind(sad_tab::SadTabKind kind) { | |
34 return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | |
blundell
2014/09/05 09:08:53
Why does this have to go through the client, out o
hashimoto
2014/09/08 12:14:49
IIUC trybots were not good at handling patches wit
| |
35 (kind == sad_tab::SAD_TAB_KIND_CRASHED) ? IDR_SAD_TAB : IDR_KILLED_TAB); | |
36 } | |
OLD | NEW |