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