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

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

Issue 15745022: Add custom icon support to GlobalError. Show extension icon in permissions increase bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/global_error/global_error.h" 5 #include "chrome/browser/ui/global_error/global_error.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" 8 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/image/image.h"
10 12
11 GlobalError::GlobalError() 13 GlobalError::GlobalError()
12 : has_shown_bubble_view_(false), 14 : has_shown_bubble_view_(false),
13 bubble_view_(NULL) { 15 bubble_view_(NULL) {
14 } 16 }
15 17
16 GlobalError::~GlobalError() { 18 GlobalError::~GlobalError() {
17 } 19 }
18 20
19 GlobalError::Severity GlobalError::GetSeverity() { 21 GlobalError::Severity GlobalError::GetSeverity() {
(...skipping 18 matching lines...) Expand all
38 #else 40 #else
39 bubble_view_ = 41 bubble_view_ =
40 GlobalErrorBubbleViewBase::ShowBubbleView(browser, AsWeakPtr()); 42 GlobalErrorBubbleViewBase::ShowBubbleView(browser, AsWeakPtr());
41 #endif 43 #endif
42 } 44 }
43 45
44 GlobalErrorBubbleViewBase* GlobalError::GetBubbleView() { 46 GlobalErrorBubbleViewBase* GlobalError::GetBubbleView() {
45 return bubble_view_; 47 return bubble_view_;
46 } 48 }
47 49
48 int GlobalError::GetBubbleViewIconResourceID() { 50 gfx::Image GlobalError::GetBubbleViewIcon() {
49 // If you change this make sure to also change the menu icon and the wrench 51 // If you change this make sure to also change the menu icon and the wrench
50 // icon color. 52 // icon color.
51 return IDR_INPUT_ALERT; 53 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(
54 IDR_INPUT_ALERT);
52 } 55 }
53 56
54 void GlobalError::BubbleViewDidClose(Browser* browser) { 57 void GlobalError::BubbleViewDidClose(Browser* browser) {
55 DCHECK(browser); 58 DCHECK(browser);
56 bubble_view_ = NULL; 59 bubble_view_ = NULL;
57 OnBubbleViewDidClose(browser); 60 OnBubbleViewDidClose(browser);
58 } 61 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/global_error/global_error.h ('k') | chrome/browser/ui/gtk/global_error_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698