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

Side by Side Diff: chrome/browser/ui/views/search_view_controller.h

Issue 10910232: SearchViewController needs more tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 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 "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/ui/search/search_model_observer.h" 11 #include "chrome/browser/ui/search/search_model_observer.h"
12 #include "ui/compositor/layer_animation_observer.h" 12 #include "ui/compositor/layer_animation_observer.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 14
15 class ContentsContainer; 15 class ContentsContainer;
16 class LocationBarContainer; 16 class LocationBarContainer;
17 class TabContents; 17 class TabContents;
18 class ToolbarView; 18 class ToolbarView;
19 19
20 namespace chrome { 20 namespace chrome {
21 namespace search { 21 namespace search {
22 class SearchModel; 22 class SearchModel;
23 class SearchViewControllerTest;
23 class ToolbarSearchAnimator; 24 class ToolbarSearchAnimator;
24 } 25 }
25 } 26 }
26 27
27 namespace content { 28 namespace content {
28 class BrowserContext; 29 class BrowserContext;
29 class WebContents; 30 class WebContents;
30 } 31 }
31 32
32 namespace internal { 33 namespace internal {
33 class OmniboxPopupContainer; 34 class OmniboxPopupContainer;
34 } 35 }
35 36
36 namespace views { 37 namespace views {
37 class ImageView; 38 class ImageView;
38 class Label; 39 class Label;
39 class View; 40 class View;
40 class WebView; 41 class WebView;
41 } 42 }
42 43
43 // SearchViewController maintains the search overlay (native new tab page). 44 // SearchViewController maintains the search overlay (native new tab page).
44 // To avoid ordering dependencies this class listens directly to the 45 // To avoid ordering dependencies this class listens directly to the
45 // SearchModel of the active tab. BrowserView is responsible for telling this 46 // SearchModel of the active tab. BrowserView is responsible for telling this
46 // class when the active tab changes. 47 // class when the active tab changes.
47 class SearchViewController 48 class SearchViewController
48 : public chrome::search::SearchModelObserver, 49 : public chrome::search::SearchModelObserver,
49 public ui::ImplicitAnimationObserver { 50 public ui::ImplicitAnimationObserver {
50 friend class internal::OmniboxPopupContainer; 51 friend class internal::OmniboxPopupContainer;
51 friend class SearchViewControllerTest; 52 friend class chrome::search::SearchViewControllerTest;
52 53
53 public: 54 public:
54 SearchViewController( 55 SearchViewController(
55 content::BrowserContext* browser_context, 56 content::BrowserContext* browser_context,
56 ContentsContainer* contents_container, 57 ContentsContainer* contents_container,
57 chrome::search::ToolbarSearchAnimator* toolbar_search_animator, 58 chrome::search::ToolbarSearchAnimator* toolbar_search_animator,
58 ToolbarView* toolbar_view); 59 ToolbarView* toolbar_view);
59 virtual ~SearchViewController(); 60 virtual ~SearchViewController();
60 61
61 // Provides a host parent view for the omnibox popup. 62 // Provides a host parent view for the omnibox popup.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // |ntp_container_| when in the NTP state. 219 // |ntp_container_| when in the NTP state.
219 views::WebView* content_view_; 220 views::WebView* content_view_;
220 221
221 // Container provided to clients to host the omnibox popup view. 222 // Container provided to clients to host the omnibox popup view.
222 internal::OmniboxPopupContainer* omnibox_popup_parent_; 223 internal::OmniboxPopupContainer* omnibox_popup_parent_;
223 224
224 DISALLOW_COPY_AND_ASSIGN(SearchViewController); 225 DISALLOW_COPY_AND_ASSIGN(SearchViewController);
225 }; 226 };
226 227
227 #endif // CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_ 228 #endif // CHROME_BROWSER_UI_VIEWS_SEARCH_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698