Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Side by Side Diff: ash/shell/app_list.cc

Issue 105773004: Introduces the speech recognition UI to app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "ash/session_state_delegate.h" 7 #include "ash/session_state_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell/example_factory.h" 9 #include "ash/shell/example_factory.h"
10 #include "ash/shell/toplevel_window.h" 10 #include "ash/shell/toplevel_window.h"
11 #include "ash/shell_delegate.h" 11 #include "ash/shell_delegate.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/i18n/case_conversion.h" 15 #include "base/i18n/case_conversion.h"
16 #include "base/i18n/string_search.h" 16 #include "base/i18n/string_search.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "ui/app_list/app_list_item_list.h" 20 #include "ui/app_list/app_list_item_list.h"
21 #include "ui/app_list/app_list_item_model.h" 21 #include "ui/app_list/app_list_item_model.h"
22 #include "ui/app_list/app_list_model.h" 22 #include "ui/app_list/app_list_model.h"
23 #include "ui/app_list/app_list_view_delegate.h" 23 #include "ui/app_list/app_list_view_delegate.h"
24 #include "ui/app_list/search_box_model.h" 24 #include "ui/app_list/search_box_model.h"
25 #include "ui/app_list/search_result.h" 25 #include "ui/app_list/search_result.h"
26 #include "ui/app_list/speech_ui_model.h"
26 #include "ui/gfx/canvas.h" 27 #include "ui/gfx/canvas.h"
27 #include "ui/gfx/font.h" 28 #include "ui/gfx/font.h"
28 #include "ui/gfx/image/image_skia.h" 29 #include "ui/gfx/image/image_skia.h"
29 #include "ui/gfx/rect.h" 30 #include "ui/gfx/rect.h"
30 #include "ui/views/examples/examples_window_with_content.h" 31 #include "ui/views/examples/examples_window_with_content.h"
31 32
32 namespace ash { 33 namespace ash {
33 namespace shell { 34 namespace shell {
34 35
35 namespace { 36 namespace {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 virtual const Users& GetUsers() const OVERRIDE { 245 virtual const Users& GetUsers() const OVERRIDE {
245 return users_; 246 return users_;
246 } 247 }
247 248
248 virtual app_list::AppListModel* GetModel() OVERRIDE { return model_.get(); } 249 virtual app_list::AppListModel* GetModel() OVERRIDE { return model_.get(); }
249 250
250 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { 251 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE {
251 return NULL; 252 return NULL;
252 } 253 }
253 254
255 virtual app_list::SpeechUIModel* GetSpeechUI() OVERRIDE {
256 return &speech_ui_;
257 }
258
254 virtual void GetShortcutPathForApp( 259 virtual void GetShortcutPathForApp(
255 const std::string& app_id, 260 const std::string& app_id,
256 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE { 261 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE {
257 callback.Run(base::FilePath()); 262 callback.Run(base::FilePath());
258 } 263 }
259 264
260 virtual void OpenSearchResult(app_list::SearchResult* result, 265 virtual void OpenSearchResult(app_list::SearchResult* result,
261 int event_flags) OVERRIDE { 266 int event_flags) OVERRIDE {
262 const ExampleSearchResult* example_result = 267 const ExampleSearchResult* example_result =
263 static_cast<const ExampleSearchResult*>(result); 268 static_cast<const ExampleSearchResult*>(result);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 virtual void ShowForProfileByPath( 336 virtual void ShowForProfileByPath(
332 const base::FilePath& profile_path) OVERRIDE { 337 const base::FilePath& profile_path) OVERRIDE {
333 // Nothing needs to be done. 338 // Nothing needs to be done.
334 } 339 }
335 340
336 virtual content::WebContents* GetStartPageContents() OVERRIDE { 341 virtual content::WebContents* GetStartPageContents() OVERRIDE {
337 return NULL; 342 return NULL;
338 } 343 }
339 344
340 scoped_ptr<app_list::AppListModel> model_; 345 scoped_ptr<app_list::AppListModel> model_;
346 app_list::SpeechUIModel speech_ui_;
341 Users users_; 347 Users users_;
342 348
343 DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate); 349 DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate);
344 }; 350 };
345 351
346 } // namespace 352 } // namespace
347 353
348 app_list::AppListViewDelegate* CreateAppListViewDelegate() { 354 app_list::AppListViewDelegate* CreateAppListViewDelegate() {
349 return new ExampleAppListViewDelegate; 355 return new ExampleAppListViewDelegate;
350 } 356 }
351 357
352 } // namespace shell 358 } // namespace shell
353 } // namespace ash 359 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698