| 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/views/exclusive_access_bubble_views.h" | 5 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" | 
| 6 | 6 | 
| 7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" | 
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" | 
| 9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" | 
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" | 
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 206   views::BubbleBorder::Shadow shadow_type = views::BubbleBorder::BIG_SHADOW; | 206   views::BubbleBorder::Shadow shadow_type = views::BubbleBorder::BIG_SHADOW; | 
| 207 #if defined(OS_LINUX) | 207 #if defined(OS_LINUX) | 
| 208   // Use a smaller shadow on Linux (including ChromeOS) as the shadow assets can | 208   // Use a smaller shadow on Linux (including ChromeOS) as the shadow assets can | 
| 209   // overlap each other in a fullscreen notification bubble. | 209   // overlap each other in a fullscreen notification bubble. | 
| 210   // See http://crbug.com/462983. | 210   // See http://crbug.com/462983. | 
| 211   shadow_type = views::BubbleBorder::SMALL_SHADOW; | 211   shadow_type = views::BubbleBorder::SMALL_SHADOW; | 
| 212 #endif | 212 #endif | 
| 213   if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled()) | 213   if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled()) | 
| 214     shadow_type = views::BubbleBorder::NO_ASSETS; | 214     shadow_type = views::BubbleBorder::NO_ASSETS; | 
| 215 | 215 | 
| 216   ui::NativeTheme* theme = ui::NativeTheme::instance(); | 216   // TODO(estade): don't use this static instance. See http://crbug.com/558162 | 
|  | 217   ui::NativeTheme* theme = ui::NativeTheme::GetInstanceForWeb(); | 
| 217   SkColor background_color = | 218   SkColor background_color = | 
| 218       ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled() | 219       ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled() | 
| 219           ? SkColorSetA(SK_ColorBLACK, kBackgroundOpacity) | 220           ? SkColorSetA(SK_ColorBLACK, kBackgroundOpacity) | 
| 220           : theme->GetSystemColor(ui::NativeTheme::kColorId_BubbleBackground); | 221           : theme->GetSystemColor(ui::NativeTheme::kColorId_BubbleBackground); | 
| 221   SkColor foreground_color = | 222   SkColor foreground_color = | 
| 222       ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled() | 223       ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled() | 
| 223           ? SK_ColorWHITE | 224           ? SK_ColorWHITE | 
| 224           : theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); | 225           : theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); | 
| 225 | 226 | 
| 226   scoped_ptr<views::BubbleBorder> bubble_border(new views::BubbleBorder( | 227   scoped_ptr<views::BubbleBorder> bubble_border(new views::BubbleBorder( | 
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 616     const content::NotificationDetails& details) { | 617     const content::NotificationDetails& details) { | 
| 617   DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); | 618   DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); | 
| 618   UpdateForImmersiveState(); | 619   UpdateForImmersiveState(); | 
| 619 } | 620 } | 
| 620 | 621 | 
| 621 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged( | 622 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged( | 
| 622     views::Widget* widget, | 623     views::Widget* widget, | 
| 623     bool visible) { | 624     bool visible) { | 
| 624   UpdateMouseWatcher(); | 625   UpdateMouseWatcher(); | 
| 625 } | 626 } | 
| OLD | NEW | 
|---|