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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
11 #include "ui/app_list/app_list_model.h" | 11 #include "ui/app_list/app_list_model.h" |
12 #include "ui/app_list/app_list_switches.h" | |
tapted
2014/03/10 02:41:54
Remove app_list_view.cc from the diff? These chang
calamity
2014/03/14 07:50:02
Done.
| |
12 #include "ui/app_list/app_list_view_delegate.h" | 13 #include "ui/app_list/app_list_view_delegate.h" |
13 #include "ui/app_list/pagination_model.h" | 14 #include "ui/app_list/pagination_model.h" |
14 #include "ui/app_list/signin_delegate.h" | 15 #include "ui/app_list/signin_delegate.h" |
15 #include "ui/app_list/speech_ui_model.h" | 16 #include "ui/app_list/speech_ui_model.h" |
16 #include "ui/app_list/views/app_list_background.h" | 17 #include "ui/app_list/views/app_list_background.h" |
17 #include "ui/app_list/views/app_list_main_view.h" | 18 #include "ui/app_list/views/app_list_main_view.h" |
18 #include "ui/app_list/views/app_list_view_observer.h" | 19 #include "ui/app_list/views/app_list_view_observer.h" |
20 #include "ui/app_list/views/contents_view.h" | |
19 #include "ui/app_list/views/search_box_view.h" | 21 #include "ui/app_list/views/search_box_view.h" |
20 #include "ui/app_list/views/signin_view.h" | 22 #include "ui/app_list/views/signin_view.h" |
21 #include "ui/app_list/views/speech_view.h" | 23 #include "ui/app_list/views/speech_view.h" |
22 #include "ui/base/ui_base_switches.h" | 24 #include "ui/base/ui_base_switches.h" |
23 #include "ui/compositor/layer.h" | 25 #include "ui/compositor/layer.h" |
24 #include "ui/compositor/scoped_layer_animation_settings.h" | 26 #include "ui/compositor/scoped_layer_animation_settings.h" |
25 #include "ui/gfx/image/image_skia.h" | 27 #include "ui/gfx/image/image_skia.h" |
26 #include "ui/gfx/insets.h" | 28 #include "ui/gfx/insets.h" |
27 #include "ui/gfx/path.h" | 29 #include "ui/gfx/path.h" |
28 #include "ui/gfx/skia_util.h" | 30 #include "ui/gfx/skia_util.h" |
(...skipping 28 matching lines...) Loading... | |
57 | 59 |
58 // The distance between the arrow tip and edge of the anchor view. | 60 // The distance between the arrow tip and edge of the anchor view. |
59 const int kArrowOffset = 10; | 61 const int kArrowOffset = 10; |
60 | 62 |
61 // Determines whether the current environment supports shadows bubble borders. | 63 // Determines whether the current environment supports shadows bubble borders. |
62 bool SupportsShadow() { | 64 bool SupportsShadow() { |
63 #if defined(OS_WIN) | 65 #if defined(OS_WIN) |
64 // Shadows are not supported on Windows without Aero Glass. | 66 // Shadows are not supported on Windows without Aero Glass. |
65 if (!ui::win::IsAeroGlassEnabled() || | 67 if (!ui::win::IsAeroGlassEnabled() || |
66 CommandLine::ForCurrentProcess()->HasSwitch( | 68 CommandLine::ForCurrentProcess()->HasSwitch( |
67 switches::kDisableDwmComposition)) { | 69 ::switches::kDisableDwmComposition)) { |
68 return false; | 70 return false; |
69 } | 71 } |
70 #elif defined(OS_LINUX) && !defined(USE_ASH) | 72 #elif defined(OS_LINUX) && !defined(USE_ASH) |
71 // Shadows are not supported on (non-ChromeOS) Linux. | 73 // Shadows are not supported on (non-ChromeOS) Linux. |
72 return false; | 74 return false; |
73 #endif | 75 #endif |
74 return true; | 76 return true; |
75 } | 77 } |
76 | 78 |
77 } // namespace | 79 } // namespace |
(...skipping 421 matching lines...) Loading... | |
499 #else | 501 #else |
500 speech_view_->SetVisible(recognizing); | 502 speech_view_->SetVisible(recognizing); |
501 app_list_main_view_->SetVisible(!recognizing); | 503 app_list_main_view_->SetVisible(!recognizing); |
502 | 504 |
503 // Needs to schedule paint of AppListView itself, to repaint the background. | 505 // Needs to schedule paint of AppListView itself, to repaint the background. |
504 GetBubbleFrameView()->SchedulePaint(); | 506 GetBubbleFrameView()->SchedulePaint(); |
505 #endif | 507 #endif |
506 } | 508 } |
507 | 509 |
508 } // namespace app_list | 510 } // namespace app_list |
OLD | NEW |