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

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: safety third Created 7 years, 7 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/gfx/image/image.h"
10 11
11 GlobalError::GlobalError() 12 GlobalError::GlobalError()
12 : has_shown_bubble_view_(false), 13 : has_shown_bubble_view_(false),
13 bubble_view_(NULL) { 14 bubble_view_(NULL) {
14 } 15 }
15 16
16 GlobalError::~GlobalError() { 17 GlobalError::~GlobalError() {
17 } 18 }
18 19
19 GlobalError::Severity GlobalError::GetSeverity() { 20 GlobalError::Severity GlobalError::GetSeverity() {
(...skipping 18 matching lines...) Expand all
38 #else 39 #else
39 bubble_view_ = 40 bubble_view_ =
40 GlobalErrorBubbleViewBase::ShowBubbleView(browser, AsWeakPtr()); 41 GlobalErrorBubbleViewBase::ShowBubbleView(browser, AsWeakPtr());
41 #endif 42 #endif
42 } 43 }
43 44
44 GlobalErrorBubbleViewBase* GlobalError::GetBubbleView() { 45 GlobalErrorBubbleViewBase* GlobalError::GetBubbleView() {
45 return bubble_view_; 46 return bubble_view_;
46 } 47 }
47 48
49 gfx::Image* GlobalError::GetBubbleViewCustomIcon() {
50 return NULL;
51 }
52
48 int GlobalError::GetBubbleViewIconResourceID() { 53 int GlobalError::GetBubbleViewIconResourceID() {
49 // If you change this make sure to also change the menu icon and the wrench 54 // If you change this make sure to also change the menu icon and the wrench
50 // icon color. 55 // icon color.
51 return IDR_INPUT_ALERT; 56 return IDR_INPUT_ALERT;
52 } 57 }
53 58
54 void GlobalError::BubbleViewDidClose(Browser* browser) { 59 void GlobalError::BubbleViewDidClose(Browser* browser) {
55 DCHECK(browser); 60 DCHECK(browser);
56 bubble_view_ = NULL; 61 bubble_view_ = NULL;
57 OnBubbleViewDidClose(browser); 62 OnBubbleViewDidClose(browser);
58 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698