| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 // Set if we should show a focus rect while the location entry field is | 184 // Set if we should show a focus rect while the location entry field is |
| 185 // focused. Used when the toolbar is in full keyboard accessibility mode. | 185 // focused. Used when the toolbar is in full keyboard accessibility mode. |
| 186 // Repaints if necessary. | 186 // Repaints if necessary. |
| 187 virtual void SetShowFocusRect(bool show); | 187 virtual void SetShowFocusRect(bool show); |
| 188 | 188 |
| 189 // Select all of the text. Needed when the user tabs through controls | 189 // Select all of the text. Needed when the user tabs through controls |
| 190 // in the toolbar in full keyboard accessibility mode. | 190 // in the toolbar in full keyboard accessibility mode. |
| 191 virtual void SelectAll(); | 191 virtual void SelectAll(); |
| 192 | 192 |
| 193 #if defined(OS_WIN) | 193 #if defined(OS_WIN) && !defined(USE_AURA) |
| 194 // Event Handlers | 194 // Event Handlers |
| 195 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 195 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 196 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 196 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 197 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 197 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 198 virtual void OnMouseCaptureLost() OVERRIDE; | 198 virtual void OnMouseCaptureLost() OVERRIDE; |
| 199 #endif | 199 #endif |
| 200 | 200 |
| 201 const LocationIconView* location_icon_view() const { | 201 const LocationIconView* location_icon_view() const { |
| 202 return location_icon_view_; | 202 return location_icon_view_; |
| 203 } | 203 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 void DeletePageActionViews(); | 314 void DeletePageActionViews(); |
| 315 | 315 |
| 316 // Update the views for the Page Actions, to reflect state changes for | 316 // Update the views for the Page Actions, to reflect state changes for |
| 317 // PageActions. | 317 // PageActions. |
| 318 void RefreshPageActionViews(); | 318 void RefreshPageActionViews(); |
| 319 | 319 |
| 320 // Sets the visibility of view to new_vis. | 320 // Sets the visibility of view to new_vis. |
| 321 void ToggleVisibility(bool new_vis, views::View* view); | 321 void ToggleVisibility(bool new_vis, views::View* view); |
| 322 | 322 |
| 323 #if defined(OS_WIN) | 323 #if defined(OS_WIN) |
| 324 #if !defined(USE_AURA) |
| 324 // Helper for the Mouse event handlers that does all the real work. | 325 // Helper for the Mouse event handlers that does all the real work. |
| 325 void OnMouseEvent(const views::MouseEvent& event, UINT msg); | 326 void OnMouseEvent(const views::MouseEvent& event, UINT msg); |
| 327 #endif |
| 326 | 328 |
| 327 // Returns true if the suggest text is valid. | 329 // Returns true if the suggest text is valid. |
| 328 bool HasValidSuggestText() const; | 330 bool HasValidSuggestText() const; |
| 329 | 331 |
| 332 #if !defined(USE_AURA) |
| 330 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if | 333 // Returns |location_entry_| cast to OmniboxViewWin, or NULL if |
| 331 // |location_entry_| is of a different type. | 334 // |location_entry_| is of a different type. |
| 332 OmniboxViewWin* GetOmniboxViewWin(); | 335 OmniboxViewWin* GetOmniboxViewWin(); |
| 333 #endif | 336 #endif |
| 337 #endif |
| 334 | 338 |
| 335 // Helper to show the first run info bubble. | 339 // Helper to show the first run info bubble. |
| 336 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); | 340 void ShowFirstRunBubbleInternal(FirstRun::BubbleType bubble_type); |
| 337 | 341 |
| 338 // The Autocomplete Edit field. | 342 // The Autocomplete Edit field. |
| 339 scoped_ptr<OmniboxView> location_entry_; | 343 scoped_ptr<OmniboxView> location_entry_; |
| 340 | 344 |
| 341 // The Browser object that corresponds to this View. | 345 // The Browser object that corresponds to this View. |
| 342 Browser* browser_; | 346 Browser* browser_; |
| 343 | 347 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 // While animating, the host clips the widget and draws only the bottom | 423 // While animating, the host clips the widget and draws only the bottom |
| 420 // part of it. The view needs to know the pixel offset at which we are drawing | 424 // part of it. The view needs to know the pixel offset at which we are drawing |
| 421 // the widget so that we can draw the curved edges that attach to the toolbar | 425 // the widget so that we can draw the curved edges that attach to the toolbar |
| 422 // in the right location. | 426 // in the right location. |
| 423 int animation_offset_; | 427 int animation_offset_; |
| 424 | 428 |
| 425 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 429 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 426 }; | 430 }; |
| 427 | 431 |
| 428 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 432 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |