OLD | NEW |
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" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 GlobalError::~GlobalError() {} | 23 GlobalError::~GlobalError() {} |
24 | 24 |
25 GlobalError::Severity GlobalError::GetSeverity() { return SEVERITY_MEDIUM; } | 25 GlobalError::Severity GlobalError::GetSeverity() { return SEVERITY_MEDIUM; } |
26 | 26 |
27 gfx::Image GlobalError::MenuItemIcon() { | 27 gfx::Image GlobalError::MenuItemIcon() { |
28 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 28 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
29 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 29 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
30 IDR_INPUT_ALERT_MENU); | 30 IDR_INPUT_ALERT_MENU); |
31 #else | 31 #else |
32 return gfx::Image( | 32 return gfx::Image(gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 18, |
33 gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 18, gfx::kAmber)); | 33 gfx::kGoogleYellow700)); |
34 #endif | 34 #endif |
35 } | 35 } |
36 | 36 |
37 // GlobalErrorWithStandardBubble --------------------------------------------- | 37 // GlobalErrorWithStandardBubble --------------------------------------------- |
38 | 38 |
39 GlobalErrorWithStandardBubble::GlobalErrorWithStandardBubble() | 39 GlobalErrorWithStandardBubble::GlobalErrorWithStandardBubble() |
40 : has_shown_bubble_view_(false), bubble_view_(NULL) {} | 40 : has_shown_bubble_view_(false), bubble_view_(NULL) {} |
41 | 41 |
42 GlobalErrorWithStandardBubble::~GlobalErrorWithStandardBubble() {} | 42 GlobalErrorWithStandardBubble::~GlobalErrorWithStandardBubble() {} |
43 | 43 |
(...skipping 30 matching lines...) Expand all Loading... |
74 | 74 |
75 bool GlobalErrorWithStandardBubble::ShouldAddElevationIconToAcceptButton() { | 75 bool GlobalErrorWithStandardBubble::ShouldAddElevationIconToAcceptButton() { |
76 return false; | 76 return false; |
77 } | 77 } |
78 | 78 |
79 void GlobalErrorWithStandardBubble::BubbleViewDidClose(Browser* browser) { | 79 void GlobalErrorWithStandardBubble::BubbleViewDidClose(Browser* browser) { |
80 DCHECK(browser); | 80 DCHECK(browser); |
81 bubble_view_ = NULL; | 81 bubble_view_ = NULL; |
82 OnBubbleViewDidClose(browser); | 82 OnBubbleViewDidClose(browser); |
83 } | 83 } |
OLD | NEW |