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 #ifndef CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/ui/search/search_model_observer.h" | 10 #include "chrome/browser/ui/search/search_model_observer.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 virtual void OnImplicitAnimationsCompleted() OVERRIDE; | 65 virtual void OnImplicitAnimationsCompleted() OVERRIDE; |
66 | 66 |
67 private: | 67 private: |
68 enum State { | 68 enum State { |
69 // Search/ntp is not visible. | 69 // Search/ntp is not visible. |
70 STATE_NOT_VISIBLE, | 70 STATE_NOT_VISIBLE, |
71 | 71 |
72 // Layout for the new tab page. | 72 // Layout for the new tab page. |
73 STATE_NTP, | 73 STATE_NTP, |
74 | 74 |
75 // Animating between STATE_NTP and STATE_SEARCH. | 75 // Animating between STATE_NTP and STATE_SUGGESTIONS. |
76 STATE_ANIMATING, | 76 STATE_NTP_ANIMATING, |
77 | 77 |
78 // Search layout. This is only used when the omnibox is visible. | 78 // Search layout. This is only used when the suggestions UI is visible. |
79 STATE_SEARCH, | 79 STATE_SUGGESTIONS, |
80 }; | 80 }; |
81 | 81 |
82 class OmniboxPopupViewParent; | 82 class OmniboxPopupViewParent; |
83 | 83 |
84 // Invokes SetState() based on the search model and omnibox. | 84 // Invokes SetState() based on the search model and omnibox. |
85 void UpdateState(); | 85 void UpdateState(); |
86 | 86 |
87 // Updates the views and animations. May do any of the following: create the | 87 // Updates the views and animations. May do any of the following: create the |
88 // views, start an animation, or destroy the views. What happens is determined | 88 // views, start an animation, or destroy the views. What happens is determined |
89 // from the current state of the SearchModel. | 89 // from the current state of the SearchModel. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // An alias to |contents_container_->active()|, but reparented within | 155 // An alias to |contents_container_->active()|, but reparented within |
156 // |ntp_view_| when in the NTP state. | 156 // |ntp_view_| when in the NTP state. |
157 views::WebView* content_view_; | 157 views::WebView* content_view_; |
158 | 158 |
159 OmniboxPopupViewParent* omnibox_popup_view_parent_; | 159 OmniboxPopupViewParent* omnibox_popup_view_parent_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(SearchViewController); | 161 DISALLOW_COPY_AND_ASSIGN(SearchViewController); |
162 }; | 162 }; |
163 | 163 |
164 #endif // CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ | 164 #endif // CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ |
OLD | NEW |