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

Side by Side Diff: chrome/browser/ui/chrome_sad_tab_client.cc

Issue 543663002: Componentize sad_tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698