| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Toggles the star on or off. | 145 // Toggles the star on or off. |
| 146 void SetStarToggled(bool on); | 146 void SetStarToggled(bool on); |
| 147 | 147 |
| 148 // Shows the bookmark bubble. | 148 // Shows the bookmark bubble. |
| 149 void ShowStarBubble(const GURL& url, bool newly_bookmarked); | 149 void ShowStarBubble(const GURL& url, bool newly_bookmarked); |
| 150 | 150 |
| 151 // Returns the screen coordinates of the location entry (where the URL text | 151 // Returns the screen coordinates of the location entry (where the URL text |
| 152 // appears, not where the icons are shown). | 152 // appears, not where the icons are shown). |
| 153 gfx::Point GetLocationEntryOrigin() const; | 153 gfx::Point GetLocationEntryOrigin() const; |
| 154 | 154 |
| 155 #if defined(OS_WIN) |
| 156 // Invoked from AutocompleteEditViewWin to show the instant suggestion. |
| 157 void SetInstantSuggestion(const string16& text, |
| 158 bool animate_to_complete); |
| 159 |
| 155 // Returns the current instant suggestion text. | 160 // Returns the current instant suggestion text. |
| 156 string16 GetInstantSuggestion() const; | 161 string16 GetInstantSuggestion() const; |
| 162 #endif |
| 157 | 163 |
| 158 // Sizing functions | 164 // Sizing functions |
| 159 virtual gfx::Size GetPreferredSize() OVERRIDE; | 165 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 160 | 166 |
| 161 // Layout and Painting functions | 167 // Layout and Painting functions |
| 162 virtual void Layout() OVERRIDE; | 168 virtual void Layout() OVERRIDE; |
| 163 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 169 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 164 | 170 |
| 165 // No focus border for the location bar, the caret is enough. | 171 // No focus border for the location bar, the caret is enough. |
| 166 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE { } | 172 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE { } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 const gfx::Point& press_pt, | 222 const gfx::Point& press_pt, |
| 217 OSExchangeData* data) OVERRIDE; | 223 OSExchangeData* data) OVERRIDE; |
| 218 virtual int GetDragOperationsForView(View* sender, | 224 virtual int GetDragOperationsForView(View* sender, |
| 219 const gfx::Point& p) OVERRIDE; | 225 const gfx::Point& p) OVERRIDE; |
| 220 virtual bool CanStartDragForView(View* sender, | 226 virtual bool CanStartDragForView(View* sender, |
| 221 const gfx::Point& press_pt, | 227 const gfx::Point& press_pt, |
| 222 const gfx::Point& p) OVERRIDE; | 228 const gfx::Point& p) OVERRIDE; |
| 223 | 229 |
| 224 // Overridden from LocationBar: | 230 // Overridden from LocationBar: |
| 225 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; | 231 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE; |
| 226 virtual void SetSuggestedText(const string16& text) OVERRIDE; | 232 virtual void SetSuggestedText(const string16& text, |
| 233 InstantCompleteBehavior behavior) OVERRIDE; |
| 227 virtual std::wstring GetInputString() const OVERRIDE; | 234 virtual std::wstring GetInputString() const OVERRIDE; |
| 228 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; | 235 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; |
| 229 virtual PageTransition::Type GetPageTransition() const OVERRIDE; | 236 virtual PageTransition::Type GetPageTransition() const OVERRIDE; |
| 230 virtual void AcceptInput() OVERRIDE; | 237 virtual void AcceptInput() OVERRIDE; |
| 231 virtual void FocusLocation(bool select_all) OVERRIDE; | 238 virtual void FocusLocation(bool select_all) OVERRIDE; |
| 232 virtual void FocusSearch() OVERRIDE; | 239 virtual void FocusSearch() OVERRIDE; |
| 233 virtual void UpdateContentSettingsIcons() OVERRIDE; | 240 virtual void UpdateContentSettingsIcons() OVERRIDE; |
| 234 virtual void UpdatePageActions() OVERRIDE; | 241 virtual void UpdatePageActions() OVERRIDE; |
| 235 virtual void InvalidatePageActions() OVERRIDE; | 242 virtual void InvalidatePageActions() OVERRIDE; |
| 236 virtual void SaveStateToContents(TabContents* contents) OVERRIDE; | 243 virtual void SaveStateToContents(TabContents* contents) OVERRIDE; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 404 |
| 398 // This is in case we're destroyed before the model loads. We store the model | 405 // This is in case we're destroyed before the model loads. We store the model |
| 399 // because calling profile_->GetTemplateURLModel() in the destructor causes a | 406 // because calling profile_->GetTemplateURLModel() in the destructor causes a |
| 400 // crash. | 407 // crash. |
| 401 TemplateURLModel* template_url_model_; | 408 TemplateURLModel* template_url_model_; |
| 402 | 409 |
| 403 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 410 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 404 }; | 411 }; |
| 405 | 412 |
| 406 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 413 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |