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/macros.h" | 10 #include "base/macros.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/profiler/scoped_tracker.h" | 12 #include "base/profiler/scoped_tracker.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/win/windows_version.h" | |
15 #include "build/build_config.h" | 14 #include "build/build_config.h" |
16 #include "ui/app_list/app_list_constants.h" | 15 #include "ui/app_list/app_list_constants.h" |
17 #include "ui/app_list/app_list_model.h" | 16 #include "ui/app_list/app_list_model.h" |
18 #include "ui/app_list/app_list_switches.h" | 17 #include "ui/app_list/app_list_switches.h" |
19 #include "ui/app_list/app_list_view_delegate.h" | 18 #include "ui/app_list/app_list_view_delegate.h" |
20 #include "ui/app_list/speech_ui_model.h" | 19 #include "ui/app_list/speech_ui_model.h" |
21 #include "ui/app_list/views/app_list_folder_view.h" | 20 #include "ui/app_list/views/app_list_folder_view.h" |
22 #include "ui/app_list/views/app_list_main_view.h" | 21 #include "ui/app_list/views/app_list_main_view.h" |
23 #include "ui/app_list/views/apps_container_view.h" | 22 #include "ui/app_list/views/apps_container_view.h" |
24 #include "ui/app_list/views/contents_view.h" | 23 #include "ui/app_list/views/contents_view.h" |
(...skipping 16 matching lines...) Expand all Loading... |
41 #include "ui/views/bubble/bubble_frame_view.h" | 40 #include "ui/views/bubble/bubble_frame_view.h" |
42 #include "ui/views/bubble/bubble_window_targeter.h" | 41 #include "ui/views/bubble/bubble_window_targeter.h" |
43 #include "ui/views/controls/image_view.h" | 42 #include "ui/views/controls/image_view.h" |
44 #include "ui/views/controls/textfield/textfield.h" | 43 #include "ui/views/controls/textfield/textfield.h" |
45 #include "ui/views/layout/fill_layout.h" | 44 #include "ui/views/layout/fill_layout.h" |
46 #include "ui/views/views_delegate.h" | 45 #include "ui/views/views_delegate.h" |
47 #include "ui/views/widget/widget.h" | 46 #include "ui/views/widget/widget.h" |
48 #include "ui/wm/core/masked_window_targeter.h" | 47 #include "ui/wm/core/masked_window_targeter.h" |
49 #include "ui/wm/core/shadow_types.h" | 48 #include "ui/wm/core/shadow_types.h" |
50 | 49 |
| 50 #if defined(OS_WIN) |
| 51 #include "base/win/windows_version.h" |
| 52 #endif |
| 53 |
51 namespace app_list { | 54 namespace app_list { |
52 | 55 |
53 namespace { | 56 namespace { |
54 | 57 |
55 // The margin from the edge to the speech UI. | 58 // The margin from the edge to the speech UI. |
56 const int kSpeechUIMargin = 12; | 59 const int kSpeechUIMargin = 12; |
57 | 60 |
58 // The vertical position for the appearing animation of the speech UI. | 61 // The vertical position for the appearing animation of the speech UI. |
59 const float kSpeechUIAppearingPosition = 12; | 62 const float kSpeechUIAppearingPosition = 12; |
60 | 63 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 app_list_main_view_->SetVisible(true); | 595 app_list_main_view_->SetVisible(true); |
593 // Refocus the search box. However, if the app list widget does not have | 596 // Refocus the search box. However, if the app list widget does not have |
594 // focus, it means another window has already taken focus, and we *must not* | 597 // focus, it means another window has already taken focus, and we *must not* |
595 // focus the search box (or we would steal focus back into the app list). | 598 // focus the search box (or we would steal focus back into the app list). |
596 if (GetWidget()->IsActive()) | 599 if (GetWidget()->IsActive()) |
597 search_box_view_->search_box()->RequestFocus(); | 600 search_box_view_->search_box()->RequestFocus(); |
598 } | 601 } |
599 } | 602 } |
600 | 603 |
601 } // namespace app_list | 604 } // namespace app_list |
OLD | NEW |