| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/dom_ui/app_launcher_handler.h" | 5 #include "chrome/browser/dom_ui/app_launcher_handler.h" |
| 6 | 6 |
| 7 #include "app/animation.h" | 7 #include "app/animation.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 list->Append(app_info); | 179 list->Append(app_info); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 dictionary->Set("apps", list); | 182 dictionary->Set("apps", list); |
| 183 | 183 |
| 184 #if defined(OS_MACOSX) | 184 #if defined(OS_MACOSX) |
| 185 // App windows are not yet implemented on mac. | 185 // App windows are not yet implemented on mac. |
| 186 dictionary->SetBoolean("disableAppWindowLaunch", true); | 186 dictionary->SetBoolean("disableAppWindowLaunch", true); |
| 187 dictionary->SetBoolean("disableCreateAppShortcut", true); | 187 dictionary->SetBoolean("disableCreateAppShortcut", true); |
| 188 #endif | 188 #endif |
| 189 #if defined(OS_CHROMEOS) |
| 190 // Making shortcut does not make sense on ChromeOS because it does not have |
| 191 // a desktop. |
| 192 dictionary->SetBoolean("disableCreateAppShortcut", true); |
| 193 #endif |
| 189 } | 194 } |
| 190 | 195 |
| 191 void AppLauncherHandler::HandleGetApps(const ListValue* args) { | 196 void AppLauncherHandler::HandleGetApps(const ListValue* args) { |
| 192 DictionaryValue dictionary; | 197 DictionaryValue dictionary; |
| 193 FillAppDictionary(&dictionary); | 198 FillAppDictionary(&dictionary); |
| 194 | 199 |
| 195 // Tell the client whether to show the promo for this view. We don't do this | 200 // Tell the client whether to show the promo for this view. We don't do this |
| 196 // in the case of PREF_CHANGED because: | 201 // in the case of PREF_CHANGED because: |
| 197 // | 202 // |
| 198 // a) At that point in time, depending on the pref that changed, it can look | 203 // a) At that point in time, depending on the pref that changed, it can look |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 // We make this check for the case of minimized windows, unit tests, etc. | 406 // We make this check for the case of minimized windows, unit tests, etc. |
| 402 if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) && | 407 if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) && |
| 403 Animation::ShouldRenderRichAnimation()) { | 408 Animation::ShouldRenderRichAnimation()) { |
| 404 #if defined(OS_WIN) | 409 #if defined(OS_WIN) |
| 405 AppLaunchedAnimation::Show(extension, rect); | 410 AppLaunchedAnimation::Show(extension, rect); |
| 406 #else | 411 #else |
| 407 NOTIMPLEMENTED(); | 412 NOTIMPLEMENTED(); |
| 408 #endif | 413 #endif |
| 409 } | 414 } |
| 410 } | 415 } |
| OLD | NEW |