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 "grit/theme_resources_standard.h" | 10 #include "grit/theme_resources_standard.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 int GlobalError::MenuItemIconResourceID() { | 24 int GlobalError::MenuItemIconResourceID() { |
25 return IDR_UPDATE_MENU4; | 25 return IDR_UPDATE_MENU4; |
26 } | 26 } |
27 | 27 |
28 bool GlobalError::HasShownBubbleView() { | 28 bool GlobalError::HasShownBubbleView() { |
29 return has_shown_bubble_view_; | 29 return has_shown_bubble_view_; |
30 } | 30 } |
31 | 31 |
32 void GlobalError::ShowBubbleView(Browser* browser) { | 32 void GlobalError::ShowBubbleView(Browser* browser) { |
33 has_shown_bubble_view_ = true; | 33 has_shown_bubble_view_ = true; |
34 #if defined(OS_ANDROID) | |
Peter Kasting
2012/07/09 17:41:43
Is it correct to leave setting |has_shown_bubble_v
Philippe
2012/07/09 18:10:30
I'm not familiar with this code either :/ My goal
Yaron
2012/07/09 23:23:22
So the upshot is that right now we're silently swa
Philippe
2012/07/10 11:21:55
Done.
| |
35 NOTIMPLEMENTED() << "Chrome for Android doesn't support global errors"; | |
36 #else | |
34 bubble_view_ = | 37 bubble_view_ = |
35 GlobalErrorBubbleViewBase::ShowBubbleView(browser, AsWeakPtr()); | 38 GlobalErrorBubbleViewBase::ShowBubbleView(browser, AsWeakPtr()); |
39 #endif | |
36 } | 40 } |
37 | 41 |
38 GlobalErrorBubbleViewBase* GlobalError::GetBubbleView() { | 42 GlobalErrorBubbleViewBase* GlobalError::GetBubbleView() { |
39 return bubble_view_; | 43 return bubble_view_; |
40 } | 44 } |
41 | 45 |
42 int GlobalError::GetBubbleViewIconResourceID() { | 46 int GlobalError::GetBubbleViewIconResourceID() { |
43 return IDR_INPUT_ALERT; | 47 return IDR_INPUT_ALERT; |
44 } | 48 } |
45 | 49 |
46 void GlobalError::BubbleViewDidClose(Browser* browser) { | 50 void GlobalError::BubbleViewDidClose(Browser* browser) { |
47 DCHECK(browser); | 51 DCHECK(browser); |
48 bubble_view_ = NULL; | 52 bubble_view_ = NULL; |
49 OnBubbleViewDidClose(browser); | 53 OnBubbleViewDidClose(browser); |
50 } | 54 } |
OLD | NEW |