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

Side by Side Diff: chrome/browser/ui/browser_instant_controller.h

Issue 12047107: Change the SearchBox API from using the start/end margins of the location bar to using the start ma… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified LocationBarView::OnBoundsChanged Created 7 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_BROWSER_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_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/prefs/public/pref_change_registrar.h" 10 #include "base/prefs/public/pref_change_registrar.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Invoked by |instant_| or |browser_| to update theme information for NTP. 99 // Invoked by |instant_| or |browser_| to update theme information for NTP.
100 // Set |parse_theme_info| to true to force re-parsing of theme information. 100 // Set |parse_theme_info| to true to force re-parsing of theme information.
101 void UpdateThemeInfo(bool parse_theme_info); 101 void UpdateThemeInfo(bool parse_theme_info);
102 102
103 // Invoked by the InstantController when it wants to open a URL. 103 // Invoked by the InstantController when it wants to open a URL.
104 void OpenURL(const GURL& url, 104 void OpenURL(const GURL& url,
105 content::PageTransition transition, 105 content::PageTransition transition,
106 WindowOpenDisposition disposition); 106 WindowOpenDisposition disposition);
107 107
108 // Sets the start and end margins of the omnibox text area. 108 // Sets the stored start-edge margin and width of the location bar.
109 void SetMarginSize(int start, int end); 109 void SetStartMarginAndWidth(int margin, int width);
110 110
111 private: 111 private:
112 // Sets the value of |instant_| based on value from profile. Invoked 112 // Sets the value of |instant_| based on value from profile. Invoked
113 // on pref change. 113 // on pref change.
114 void ResetInstant(); 114 void ResetInstant();
115 115
116 // Overridden from search::SearchModelObserver: 116 // Overridden from search::SearchModelObserver:
117 virtual void ModeChanged(const search::Mode& old_mode, 117 virtual void ModeChanged(const search::Mode& old_mode,
118 const search::Mode& new_mode) OVERRIDE; 118 const search::Mode& new_mode) OVERRIDE;
119 119
(...skipping 22 matching lines...) Expand all
142 PrefChangeRegistrar profile_pref_registrar_; 142 PrefChangeRegistrar profile_pref_registrar_;
143 143
144 content::NotificationRegistrar registrar_; 144 content::NotificationRegistrar registrar_;
145 145
146 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); 146 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController);
147 }; 147 };
148 148
149 } // namespace chrome 149 } // namespace chrome
150 150
151 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ 151 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698