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

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

Issue 889593003: Animate the app list search box shadow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_animations
Patch Set: move GetShadowForZHeight to app_list_constants.cc Created 5 years, 10 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_animator.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 "ui/app_list/search_box_model_observer.h" 10 #include "ui/app_list/search_box_model_observer.h"
11 #include "ui/app_list/speech_ui_model_observer.h" 11 #include "ui/app_list/speech_ui_model_observer.h"
12 #include "ui/gfx/shadow_value.h"
12 #include "ui/views/controls/button/image_button.h" 13 #include "ui/views/controls/button/image_button.h"
13 #include "ui/views/controls/button/menu_button_listener.h" 14 #include "ui/views/controls/button/menu_button_listener.h"
14 #include "ui/views/controls/textfield/textfield_controller.h" 15 #include "ui/views/controls/textfield/textfield_controller.h"
15 #include "ui/views/view.h" 16 #include "ui/views/view.h"
16 17
17 namespace views { 18 namespace views {
18 class ImageView; 19 class ImageView;
19 class MenuButton; 20 class MenuButton;
20 class Textfield; 21 class Textfield;
21 } // namespace views 22 } // namespace views
(...skipping 19 matching lines...) Expand all
41 public: 42 public:
42 SearchBoxView(SearchBoxViewDelegate* delegate, 43 SearchBoxView(SearchBoxViewDelegate* delegate,
43 AppListViewDelegate* view_delegate); 44 AppListViewDelegate* view_delegate);
44 ~SearchBoxView() override; 45 ~SearchBoxView() override;
45 46
46 void ModelChanged(); 47 void ModelChanged();
47 bool HasSearch() const; 48 bool HasSearch() const;
48 void ClearSearch(); 49 void ClearSearch();
49 void InvalidateMenu(); 50 void InvalidateMenu();
50 51
52 // Sets the shadow border of the search box.
53 void SetShadow(const gfx::ShadowValue& shadow);
54
51 // Returns the bounds to use for the view (including the shadow) given the 55 // Returns the bounds to use for the view (including the shadow) given the
52 // desired bounds of the search box contents. 56 // desired bounds of the search box contents.
53 gfx::Rect GetViewBoundsForSearchBoxContentsBounds( 57 gfx::Rect GetViewBoundsForSearchBoxContentsBounds(
54 const gfx::Rect& rect) const; 58 const gfx::Rect& rect) const;
55 59
56 views::ImageButton* back_button() { return back_button_; } 60 views::ImageButton* back_button() { return back_button_; }
57 views::Textfield* search_box() { return search_box_; } 61 views::Textfield* search_box() { return search_box_; }
58 62
59 void set_contents_view(views::View* contents_view) { 63 void set_contents_view(views::View* contents_view) {
60 contents_view_ = contents_view; 64 contents_view_ = contents_view;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 views::MenuButton* menu_button_; // Owned by views hierarchy. 112 views::MenuButton* menu_button_; // Owned by views hierarchy.
109 views::Textfield* search_box_; // Owned by views hierarchy. 113 views::Textfield* search_box_; // Owned by views hierarchy.
110 views::View* contents_view_; // Owned by views hierarchy. 114 views::View* contents_view_; // Owned by views hierarchy.
111 115
112 DISALLOW_COPY_AND_ASSIGN(SearchBoxView); 116 DISALLOW_COPY_AND_ASSIGN(SearchBoxView);
113 }; 117 };
114 118
115 } // namespace app_list 119 } // namespace app_list
116 120
117 #endif // UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_ 121 #endif // UI_APP_LIST_VIEWS_SEARCH_BOX_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/contents_animator.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