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/app_list_constants.h" | 5 #include "ui/app_list/app_list_constants.h" |
6 | 6 |
7 namespace app_list { | 7 namespace app_list { |
8 | 8 |
9 const SkColor kContentsBackgroundColor = SkColorSetRGB(0xF2, 0xF2, 0xF2); | 9 const SkColor kContentsBackgroundColor = SkColorSetRGB(0xF2, 0xF2, 0xF2); |
10 const SkColor kSearchBoxBackground = SK_ColorWHITE; | 10 const SkColor kSearchBoxBackground = SK_ColorWHITE; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 const char kPageOpenedHistogram[] = "Apps.AppListPageOpened"; | 126 const char kPageOpenedHistogram[] = "Apps.AppListPageOpened"; |
127 | 127 |
128 // The UMA histogram that logs the type of search result opened. | 128 // The UMA histogram that logs the type of search result opened. |
129 const char kSearchResultOpenDisplayTypeHistogram[] = | 129 const char kSearchResultOpenDisplayTypeHistogram[] = |
130 "Apps.AppListSearchResultOpenDisplayType"; | 130 "Apps.AppListSearchResultOpenDisplayType"; |
131 | 131 |
132 // The UMA histogram that logs how long the search query was when a result was | 132 // The UMA histogram that logs how long the search query was when a result was |
133 // opened. | 133 // opened. |
134 const char kSearchQueryLength[] = "Apps.AppListSearchQueryLength"; | 134 const char kSearchQueryLength[] = "Apps.AppListSearchQueryLength"; |
135 | 135 |
| 136 // The UMA histogram that logs the Manhattan distance from the origin of the |
| 137 // search results to the selected result. |
| 138 const char kSearchResultDistanceFromOrigin[] = |
| 139 "Apps.AppListSearchResultDistanceFromOrigin"; |
| 140 |
136 #if defined(OS_LINUX) | 141 #if defined(OS_LINUX) |
137 #if defined(GOOGLE_CHROME_BUILD) | 142 #if defined(GOOGLE_CHROME_BUILD) |
138 const char kAppListWMClass[] = "chrome_app_list"; | 143 const char kAppListWMClass[] = "chrome_app_list"; |
139 #else // CHROMIUM_BUILD | 144 #else // CHROMIUM_BUILD |
140 const char kAppListWMClass[] = "chromium_app_list"; | 145 const char kAppListWMClass[] = "chromium_app_list"; |
141 #endif | 146 #endif |
142 #endif | 147 #endif |
143 | 148 |
144 gfx::ShadowValue GetShadowForZHeight(int z_height) { | 149 gfx::ShadowValue GetShadowForZHeight(int z_height) { |
145 if (z_height <= 0) | 150 if (z_height <= 0) |
146 return gfx::ShadowValue(); | 151 return gfx::ShadowValue(); |
147 | 152 |
148 switch (z_height) { | 153 switch (z_height) { |
149 case 1: | 154 case 1: |
150 return gfx::ShadowValue(gfx::Vector2d(0, 1), 2, | 155 return gfx::ShadowValue(gfx::Vector2d(0, 1), 2, |
151 SkColorSetARGB(0x4C, 0, 0, 0)); | 156 SkColorSetARGB(0x4C, 0, 0, 0)); |
152 case 2: | 157 case 2: |
153 return gfx::ShadowValue(gfx::Vector2d(0, 2), 4, | 158 return gfx::ShadowValue(gfx::Vector2d(0, 2), 4, |
154 SkColorSetARGB(0x33, 0, 0, 0)); | 159 SkColorSetARGB(0x33, 0, 0, 0)); |
155 default: | 160 default: |
156 return gfx::ShadowValue(gfx::Vector2d(0, 8), 12, | 161 return gfx::ShadowValue(gfx::Vector2d(0, 8), 12, |
157 SkColorSetARGB(0x3F, 0, 0, 0)); | 162 SkColorSetARGB(0x3F, 0, 0, 0)); |
158 } | 163 } |
159 } | 164 } |
160 | 165 |
161 } // namespace app_list | 166 } // namespace app_list |
OLD | NEW |