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 "ui/app_list/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // Determines whether the current environment supports shadows bubble borders. | 68 // Determines whether the current environment supports shadows bubble borders. |
69 bool SupportsShadow() { | 69 bool SupportsShadow() { |
70 #if defined(OS_WIN) | 70 #if defined(OS_WIN) |
71 // Shadows are not supported on Windows without Aero Glass. | 71 // Shadows are not supported on Windows without Aero Glass. |
72 if (!ui::win::IsAeroGlassEnabled() || | 72 if (!ui::win::IsAeroGlassEnabled() || |
73 CommandLine::ForCurrentProcess()->HasSwitch( | 73 CommandLine::ForCurrentProcess()->HasSwitch( |
74 ::switches::kDisableDwmComposition)) { | 74 ::switches::kDisableDwmComposition)) { |
75 return false; | 75 return false; |
76 } | 76 } |
77 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) | 77 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) // || defined(OS_MACOSX) |
78 // Shadows are not supported on (non-ChromeOS) Linux. | 78 // Shadows are not supported on (non-ChromeOS) Linux. |
79 return false; | 79 return false; |
80 #endif | 80 #endif |
81 return true; | 81 return true; |
82 } | 82 } |
83 | 83 |
84 // The background for the App List overlay, which appears as a white rounded | 84 // The background for the App List overlay, which appears as a white rounded |
85 // rectangle with the given radius and the same size as the target view. | 85 // rectangle with the given radius and the same size as the target view. |
86 class AppListOverlayBackground : public views::Background { | 86 class AppListOverlayBackground : public views::Background { |
87 public: | 87 public: |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 speech_view_->layer()->SetTransform(speech_transform); | 595 speech_view_->layer()->SetTransform(speech_transform); |
596 } | 596 } |
597 | 597 |
598 if (will_appear) | 598 if (will_appear) |
599 speech_view_->SetVisible(true); | 599 speech_view_->SetVisible(true); |
600 else | 600 else |
601 app_list_main_view_->SetVisible(true); | 601 app_list_main_view_->SetVisible(true); |
602 } | 602 } |
603 | 603 |
604 } // namespace app_list | 604 } // namespace app_list |
OLD | NEW |