| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const float kSpeechUIAppearingPosition = 12; | 64 const float kSpeechUIAppearingPosition = 12; |
| 65 | 65 |
| 66 // The distance between the arrow tip and edge of the anchor view. | 66 // The distance between the arrow tip and edge of the anchor view. |
| 67 const int kArrowOffset = 10; | 67 const int kArrowOffset = 10; |
| 68 | 68 |
| 69 // Determines whether the current environment supports shadows bubble borders. | 69 // Determines whether the current environment supports shadows bubble borders. |
| 70 bool SupportsShadow() { | 70 bool SupportsShadow() { |
| 71 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
| 72 // Shadows are not supported on Windows without Aero Glass. | 72 // Shadows are not supported on Windows without Aero Glass. |
| 73 if (!ui::win::IsAeroGlassEnabled() || | 73 if (!ui::win::IsAeroGlassEnabled() || |
| 74 CommandLine::ForCurrentProcess()->HasSwitch( | 74 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 75 ::switches::kDisableDwmComposition)) { | 75 ::switches::kDisableDwmComposition)) { |
| 76 return false; | 76 return false; |
| 77 } | 77 } |
| 78 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) | 78 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 79 // Shadows are not supported on (non-ChromeOS) Linux. | 79 // Shadows are not supported on (non-ChromeOS) Linux. |
| 80 return false; | 80 return false; |
| 81 #endif | 81 #endif |
| 82 return true; | 82 return true; |
| 83 } | 83 } |
| 84 | 84 |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 | 728 |
| 729 if (will_appear) { | 729 if (will_appear) { |
| 730 speech_view_->SetVisible(true); | 730 speech_view_->SetVisible(true); |
| 731 } else { | 731 } else { |
| 732 app_list_main_view_->SetVisible(true); | 732 app_list_main_view_->SetVisible(true); |
| 733 search_box_view_->search_box()->RequestFocus(); | 733 search_box_view_->search_box()->RequestFocus(); |
| 734 } | 734 } |
| 735 } | 735 } |
| 736 | 736 |
| 737 } // namespace app_list | 737 } // namespace app_list |
| OLD | NEW |