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