| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/app_list/start_page_handler.h" | 5 #include "chrome/browser/ui/webui/app_list/start_page_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
| 13 #include "chrome/browser/extensions/extension_system.h" | 13 #include "chrome/browser/extensions/extension_system.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 15 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| 16 #include "chrome/browser/ui/app_list/app_list_service.h" | 16 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 17 #include "chrome/browser/ui/app_list/recommended_apps.h" | 17 #include "chrome/browser/ui/app_list/recommended_apps.h" |
| 18 #include "chrome/browser/ui/app_list/start_page_service.h" | 18 #include "chrome/browser/ui/app_list/start_page_service.h" |
| 19 #include "chrome/browser/ui/host_desktop.h" | 19 #include "chrome/browser/ui/host_desktop.h" |
| 20 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 20 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| 21 #include "chrome/common/extensions/extension.h" | |
| 22 #include "chrome/common/extensions/extension_icon_set.h" | 21 #include "chrome/common/extensions/extension_icon_set.h" |
| 23 #include "content/public/browser/web_contents_view.h" | 22 #include "content/public/browser/web_contents_view.h" |
| 24 #include "content/public/browser/web_ui.h" | 23 #include "content/public/browser/web_ui.h" |
| 24 #include "extensions/common/extension.h" |
| 25 #include "ui/events/event_constants.h" | 25 #include "ui/events/event_constants.h" |
| 26 | 26 |
| 27 namespace app_list { | 27 namespace app_list { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 scoped_ptr<base::DictionaryValue> CreateAppInfo( | 31 scoped_ptr<base::DictionaryValue> CreateAppInfo( |
| 32 const extensions::Extension* app) { | 32 const extensions::Extension* app) { |
| 33 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue); | 33 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue); |
| 34 dict->SetString("appId", app->id()); | 34 dict->SetString("appId", app->id()); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void StartPageHandler::HandleSpeechRecognition(const base::ListValue* args) { | 135 void StartPageHandler::HandleSpeechRecognition(const base::ListValue* args) { |
| 136 bool recognizing; | 136 bool recognizing; |
| 137 CHECK(args->GetBoolean(0, &recognizing)); | 137 CHECK(args->GetBoolean(0, &recognizing)); |
| 138 | 138 |
| 139 StartPageService* service = | 139 StartPageService* service = |
| 140 StartPageService::Get(Profile::FromWebUI(web_ui())); | 140 StartPageService::Get(Profile::FromWebUI(web_ui())); |
| 141 service->OnSpeechRecognitionStateChanged(recognizing); | 141 service->OnSpeechRecognitionStateChanged(recognizing); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace app_list | 144 } // namespace app_list |
| OLD | NEW |