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

Side by Side Diff: ui/app_list/views/search_box_view.h

Issue 2941573002: cros: add google/mic icons to searchbox (Closed)
Patch Set: constexpr Created 3 years, 6 months 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
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/search_box_view.cc » ('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 #ifndef UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_
6 #define UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/app_list/search_box_model_observer.h" 11 #include "ui/app_list/search_box_model_observer.h"
12 #include "ui/app_list/speech_ui_model_observer.h" 12 #include "ui/app_list/speech_ui_model_observer.h"
13 #include "ui/gfx/shadow_value.h" 13 #include "ui/gfx/shadow_value.h"
14 #include "ui/views/controls/button/image_button.h" 14 #include "ui/views/controls/button/image_button.h"
15 #include "ui/views/controls/textfield/textfield_controller.h" 15 #include "ui/views/controls/textfield/textfield_controller.h"
16 #include "ui/views/view.h" 16 #include "ui/views/view.h"
17 17
18 namespace views { 18 namespace views {
19 class ImageView;
19 class Textfield; 20 class Textfield;
20 } // namespace views 21 } // namespace views
21 22
22 namespace app_list { 23 namespace app_list {
23 24
24 // Possible locations for partial keyboard focus (but note that the search 25 // Possible locations for partial keyboard focus (but note that the search
25 // box always handles typing). 26 // box always handles typing).
26 enum SearchBoxFocus { 27 enum SearchBoxFocus {
27 FOCUS_BACK_BUTTON, // Back button, only responds to ENTER 28 FOCUS_BACK_BUTTON, // Back button, only responds to ENTER
28 FOCUS_SEARCH_BOX, // Nothing else has partial focus 29 FOCUS_SEARCH_BOX, // Nothing else has partial focus
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void Update() override; 109 void Update() override;
109 110
110 // Overridden from SpeechUIModelObserver: 111 // Overridden from SpeechUIModelObserver:
111 void OnSpeechRecognitionStateChanged( 112 void OnSpeechRecognitionStateChanged(
112 SpeechRecognitionState new_state) override; 113 SpeechRecognitionState new_state) override;
113 114
114 SearchBoxViewDelegate* delegate_; // Not owned. 115 SearchBoxViewDelegate* delegate_; // Not owned.
115 AppListViewDelegate* view_delegate_; // Not owned. 116 AppListViewDelegate* view_delegate_; // Not owned.
116 AppListModel* model_; // Owned by the profile-keyed service. 117 AppListModel* model_; // Owned by the profile-keyed service.
117 118
118 views::View* content_container_; // Owned by views hierarchy. 119 views::View* content_container_; // Owned by views hierarchy.
120 views::ImageView* google_icon_; // Owned by views hierarchy.
119 SearchBoxImageButton* back_button_; // Owned by views hierarchy. 121 SearchBoxImageButton* back_button_; // Owned by views hierarchy.
120 SearchBoxImageButton* speech_button_; // Owned by views hierarchy. 122 SearchBoxImageButton* speech_button_; // Owned by views hierarchy.
121 views::Textfield* search_box_; // Owned by views hierarchy. 123 views::Textfield* search_box_; // Owned by views hierarchy.
122 views::View* contents_view_; // Owned by views hierarchy. 124 views::View* contents_view_; // Owned by views hierarchy.
123 app_list::AppListView* app_list_view_; // Owned by views hierarchy. 125 app_list::AppListView* app_list_view_; // Owned by views hierarchy.
124 126
125 SearchBoxFocus focused_view_; // Which element has TAB'd focus. 127 SearchBoxFocus focused_view_; // Which element has TAB'd focus.
126 128
127 // Whether the fullscreen app list feature is enabled. 129 // Whether the fullscreen app list feature is enabled.
128 const bool is_fullscreen_app_list_enabled_; 130 const bool is_fullscreen_app_list_enabled_;
129 131
130 DISALLOW_COPY_AND_ASSIGN(SearchBoxView); 132 DISALLOW_COPY_AND_ASSIGN(SearchBoxView);
131 }; 133 };
132 134
133 } // namespace app_list 135 } // namespace app_list
134 136
135 #endif // UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_ 137 #endif // UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/search_box_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698