| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // focused. Used when the toolbar is in full keyboard accessibility mode. | 218 // focused. Used when the toolbar is in full keyboard accessibility mode. |
| 219 // Repaints if necessary. | 219 // Repaints if necessary. |
| 220 virtual void SetShowFocusRect(bool show); | 220 virtual void SetShowFocusRect(bool show); |
| 221 | 221 |
| 222 // Select all of the text. Needed when the user tabs through controls | 222 // Select all of the text. Needed when the user tabs through controls |
| 223 // in the toolbar in full keyboard accessibility mode. | 223 // in the toolbar in full keyboard accessibility mode. |
| 224 virtual void SelectAll(); | 224 virtual void SelectAll(); |
| 225 | 225 |
| 226 const gfx::Font& font() const { return font_; } | 226 const gfx::Font& font() const { return font_; } |
| 227 | 227 |
| 228 // See description above field. |
| 229 void set_view_to_focus(views::View* view) { view_to_focus_ = view; } |
| 230 views::View* view_to_focus() { return view_to_focus_; } |
| 231 |
| 228 #if defined(OS_WIN) && !defined(USE_AURA) | 232 #if defined(OS_WIN) && !defined(USE_AURA) |
| 229 // Event Handlers | 233 // Event Handlers |
| 230 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 234 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 231 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 235 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 232 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 236 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 233 virtual void OnMouseCaptureLost() OVERRIDE; | 237 virtual void OnMouseCaptureLost() OVERRIDE; |
| 234 #endif | 238 #endif |
| 235 | 239 |
| 236 LocationIconView* location_icon_view() { return location_icon_view_; } | 240 LocationIconView* location_icon_view() { return location_icon_view_; } |
| 237 const LocationIconView* location_icon_view() const { | 241 const LocationIconView* location_icon_view() const { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 475 |
| 472 // While animating, the host clips the widget and draws only the bottom | 476 // While animating, the host clips the widget and draws only the bottom |
| 473 // part of it. The view needs to know the pixel offset at which we are drawing | 477 // part of it. The view needs to know the pixel offset at which we are drawing |
| 474 // the widget so that we can draw the curved edges that attach to the toolbar | 478 // the widget so that we can draw the curved edges that attach to the toolbar |
| 475 // in the right location. | 479 // in the right location. |
| 476 int animation_offset_; | 480 int animation_offset_; |
| 477 | 481 |
| 478 // Used to register for notifications received by NotificationObserver. | 482 // Used to register for notifications received by NotificationObserver. |
| 479 content::NotificationRegistrar registrar_; | 483 content::NotificationRegistrar registrar_; |
| 480 | 484 |
| 485 // The view to give focus to. This is either |this| or the |
| 486 // LocationBarContainer. |
| 487 views::View* view_to_focus_; |
| 488 |
| 481 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 489 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 482 }; | 490 }; |
| 483 | 491 |
| 484 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 492 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |