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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" | 9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" |
10 #include "chrome/grit/theme_resources.h" | 10 #include "chrome/grit/theme_resources.h" |
11 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
12 #include "ui/gfx/image/image.h" | 12 #include "ui/gfx/image/image.h" |
13 | 13 |
14 #if !defined(OS_ANDROID) | 14 #if !defined(OS_ANDROID) |
| 15 #include "chrome/app/vector_icons/vector_icons.h" |
15 #include "ui/gfx/color_palette.h" | 16 #include "ui/gfx/color_palette.h" |
16 #include "ui/gfx/paint_vector_icon.h" | 17 #include "ui/gfx/paint_vector_icon.h" |
17 #include "ui/gfx/vector_icons_public.h" | |
18 #endif | 18 #endif |
19 | 19 |
20 // GlobalError --------------------------------------------------------------- | 20 // GlobalError --------------------------------------------------------------- |
21 | 21 |
22 GlobalError::GlobalError() {} | 22 GlobalError::GlobalError() {} |
23 | 23 |
24 GlobalError::~GlobalError() {} | 24 GlobalError::~GlobalError() {} |
25 | 25 |
26 GlobalError::Severity GlobalError::GetSeverity() { return SEVERITY_MEDIUM; } | 26 GlobalError::Severity GlobalError::GetSeverity() { return SEVERITY_MEDIUM; } |
27 | 27 |
28 gfx::Image GlobalError::MenuItemIcon() { | 28 gfx::Image GlobalError::MenuItemIcon() { |
29 #if defined(OS_ANDROID) | 29 #if defined(OS_ANDROID) |
30 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( | 30 return ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
31 IDR_INPUT_ALERT_MENU); | 31 IDR_INPUT_ALERT_MENU); |
32 #else | 32 #else |
33 return gfx::Image(gfx::CreateVectorIcon( | 33 return gfx::Image( |
34 gfx::VectorIconId::BROWSER_TOOLS_ERROR, gfx::kGoogleYellow700)); | 34 gfx::CreateVectorIcon(kBrowserToolsErrorIcon, gfx::kGoogleYellow700)); |
35 #endif | 35 #endif |
36 } | 36 } |
37 | 37 |
38 // GlobalErrorWithStandardBubble --------------------------------------------- | 38 // GlobalErrorWithStandardBubble --------------------------------------------- |
39 | 39 |
40 GlobalErrorWithStandardBubble::GlobalErrorWithStandardBubble() | 40 GlobalErrorWithStandardBubble::GlobalErrorWithStandardBubble() |
41 : has_shown_bubble_view_(false), bubble_view_(NULL) {} | 41 : has_shown_bubble_view_(false), bubble_view_(NULL) {} |
42 | 42 |
43 GlobalErrorWithStandardBubble::~GlobalErrorWithStandardBubble() {} | 43 GlobalErrorWithStandardBubble::~GlobalErrorWithStandardBubble() {} |
44 | 44 |
(...skipping 30 matching lines...) Expand all Loading... |
75 | 75 |
76 bool GlobalErrorWithStandardBubble::ShouldAddElevationIconToAcceptButton() { | 76 bool GlobalErrorWithStandardBubble::ShouldAddElevationIconToAcceptButton() { |
77 return false; | 77 return false; |
78 } | 78 } |
79 | 79 |
80 void GlobalErrorWithStandardBubble::BubbleViewDidClose(Browser* browser) { | 80 void GlobalErrorWithStandardBubble::BubbleViewDidClose(Browser* browser) { |
81 DCHECK(browser); | 81 DCHECK(browser); |
82 bubble_view_ = NULL; | 82 bubble_view_ = NULL; |
83 OnBubbleViewDidClose(browser); | 83 OnBubbleViewDidClose(browser); |
84 } | 84 } |
OLD | NEW |