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 "chrome/browser/ui/app_list/app_list_view_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
32 #include "components/signin/core/browser/signin_manager.h" | 32 #include "components/signin/core/browser/signin_manager.h" |
33 #include "content/public/browser/browser_thread.h" | 33 #include "content/public/browser/browser_thread.h" |
34 #include "content/public/browser/page_navigator.h" | 34 #include "content/public/browser/page_navigator.h" |
35 #include "content/public/browser/user_metrics.h" | 35 #include "content/public/browser/user_metrics.h" |
36 #include "grit/theme_resources.h" | 36 #include "grit/theme_resources.h" |
37 #include "ui/app_list/app_list_view_delegate_observer.h" | 37 #include "ui/app_list/app_list_view_delegate_observer.h" |
38 #include "ui/app_list/search_box_model.h" | 38 #include "ui/app_list/search_box_model.h" |
39 #include "ui/app_list/speech_ui_model.h" | 39 #include "ui/app_list/speech_ui_model.h" |
40 #include "ui/base/resource/resource_bundle.h" | 40 #include "ui/base/resource/resource_bundle.h" |
41 #include "ui/gfx/geometry/rect.h" | |
42 #include "ui/keyboard/keyboard_controller.h" | |
41 | 43 |
42 #if defined(USE_ASH) | 44 #if defined(USE_ASH) |
43 #include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h" | 45 #include "chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h" |
44 #endif | 46 #endif |
45 | 47 |
46 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
47 #include "chrome/browser/web_applications/web_app_win.h" | 49 #include "chrome/browser/web_applications/web_app_win.h" |
48 #endif | 50 #endif |
49 | 51 |
50 namespace { | 52 namespace { |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 return NULL; | 407 return NULL; |
406 | 408 |
407 return service->GetSpeechRecognitionContents(); | 409 return service->GetSpeechRecognitionContents(); |
408 } | 410 } |
409 | 411 |
410 const app_list::AppListViewDelegate::Users& | 412 const app_list::AppListViewDelegate::Users& |
411 AppListViewDelegate::GetUsers() const { | 413 AppListViewDelegate::GetUsers() const { |
412 return users_; | 414 return users_; |
413 } | 415 } |
414 | 416 |
417 gfx::Rect AppListViewDelegate::GetVirtualKeyboardBounds() const { | |
418 keyboard::KeyboardController* keyboard_controller = | |
419 keyboard::KeyboardController::GetInstance(); | |
tapted
2014/04/29 06:09:53
I think you'll need to guard this in a USE_ASH or
Matt Giuca
2014/04/29 06:26:11
I thought you originally told me not to have USE_A
| |
420 if (!keyboard_controller || !keyboard_controller->keyboard_visible()) | |
421 return gfx::Rect(); | |
422 return keyboard_controller->current_keyboard_bounds(); | |
423 } | |
424 | |
415 void AppListViewDelegate::AddObserver( | 425 void AppListViewDelegate::AddObserver( |
416 app_list::AppListViewDelegateObserver* observer) { | 426 app_list::AppListViewDelegateObserver* observer) { |
417 observers_.AddObserver(observer); | 427 observers_.AddObserver(observer); |
418 } | 428 } |
419 | 429 |
420 void AppListViewDelegate::RemoveObserver( | 430 void AppListViewDelegate::RemoveObserver( |
421 app_list::AppListViewDelegateObserver* observer) { | 431 app_list::AppListViewDelegateObserver* observer) { |
422 observers_.RemoveObserver(observer); | 432 observers_.RemoveObserver(observer); |
423 } | 433 } |
OLD | NEW |