| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // Toggles the star on or off. | 148 // Toggles the star on or off. |
| 149 void SetStarToggled(bool on); | 149 void SetStarToggled(bool on); |
| 150 | 150 |
| 151 // Shows the bookmark bubble. | 151 // Shows the bookmark bubble. |
| 152 void ShowStarBubble(const GURL& url, bool newly_bookmarked); | 152 void ShowStarBubble(const GURL& url, bool newly_bookmarked); |
| 153 | 153 |
| 154 // Returns the screen coordinates of the location entry (where the URL text | 154 // Returns the screen coordinates of the location entry (where the URL text |
| 155 // appears, not where the icons are shown). | 155 // appears, not where the icons are shown). |
| 156 gfx::Point GetLocationEntryOrigin() const; | 156 gfx::Point GetLocationEntryOrigin() const; |
| 157 | 157 |
| 158 #if defined(OS_WIN) | |
| 159 // Invoked from SuggestedTextView when the suggested text should be committed. | |
| 160 void OnCommitSuggestedText(); | |
| 161 #endif | |
| 162 | |
| 163 // Sizing functions | 158 // Sizing functions |
| 164 virtual gfx::Size GetPreferredSize(); | 159 virtual gfx::Size GetPreferredSize(); |
| 165 | 160 |
| 166 // Layout and Painting functions | 161 // Layout and Painting functions |
| 167 virtual void Layout(); | 162 virtual void Layout(); |
| 168 virtual void Paint(gfx::Canvas* canvas); | 163 virtual void Paint(gfx::Canvas* canvas); |
| 169 | 164 |
| 170 // No focus border for the location bar, the caret is enough. | 165 // No focus border for the location bar, the caret is enough. |
| 171 virtual void PaintFocusBorder(gfx::Canvas* canvas) { } | 166 virtual void PaintFocusBorder(gfx::Canvas* canvas) { } |
| 172 | 167 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 187 // Event Handlers | 182 // Event Handlers |
| 188 virtual bool OnMousePressed(const views::MouseEvent& event); | 183 virtual bool OnMousePressed(const views::MouseEvent& event); |
| 189 virtual bool OnMouseDragged(const views::MouseEvent& event); | 184 virtual bool OnMouseDragged(const views::MouseEvent& event); |
| 190 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); | 185 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); |
| 191 #endif | 186 #endif |
| 192 | 187 |
| 193 // AutocompleteEditController | 188 // AutocompleteEditController |
| 194 virtual void OnAutocompleteWillClosePopup(); | 189 virtual void OnAutocompleteWillClosePopup(); |
| 195 virtual void OnAutocompleteLosingFocus(gfx::NativeView view_gaining_focus); | 190 virtual void OnAutocompleteLosingFocus(gfx::NativeView view_gaining_focus); |
| 196 virtual void OnAutocompleteWillAccept(); | 191 virtual void OnAutocompleteWillAccept(); |
| 197 virtual bool OnCommitSuggestedText(const string16& typed_text); | 192 virtual bool OnCommitSuggestedText(bool skip_inline_autocomplete); |
| 198 virtual bool AcceptCurrentInstantPreview(); | 193 virtual bool AcceptCurrentInstantPreview(); |
| 199 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds); | 194 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds); |
| 200 virtual void OnAutocompleteAccept(const GURL& url, | 195 virtual void OnAutocompleteAccept(const GURL& url, |
| 201 WindowOpenDisposition disposition, | 196 WindowOpenDisposition disposition, |
| 202 PageTransition::Type transition, | 197 PageTransition::Type transition, |
| 203 const GURL& alternate_nav_url); | 198 const GURL& alternate_nav_url); |
| 204 virtual void OnChanged(); | 199 virtual void OnChanged(); |
| 205 virtual void OnSelectionBoundsChanged(); | 200 virtual void OnSelectionBoundsChanged(); |
| 206 virtual void OnInputInProgress(bool in_progress); | 201 virtual void OnInputInProgress(bool in_progress); |
| 207 virtual void OnKillFocus(); | 202 virtual void OnKillFocus(); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 // Should instant be updated? This is set to false in OnAutocompleteWillAccept | 404 // Should instant be updated? This is set to false in OnAutocompleteWillAccept |
| 410 // and true in OnAutocompleteAccept. This is needed as prior to accepting an | 405 // and true in OnAutocompleteAccept. This is needed as prior to accepting an |
| 411 // autocomplete suggestion the model is reverted which triggers resetting | 406 // autocomplete suggestion the model is reverted which triggers resetting |
| 412 // instant. | 407 // instant. |
| 413 bool update_instant_; | 408 bool update_instant_; |
| 414 | 409 |
| 415 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 410 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 416 }; | 411 }; |
| 417 | 412 |
| 418 #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 |