| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class EVBubbleView; | 34 class EVBubbleView; |
| 35 class ExtensionAction; | 35 class ExtensionAction; |
| 36 class GURL; | 36 class GURL; |
| 37 class KeywordHintView; | 37 class KeywordHintView; |
| 38 class LocationIconView; | 38 class LocationIconView; |
| 39 class PageActionWithBadgeView; | 39 class PageActionWithBadgeView; |
| 40 class Profile; | 40 class Profile; |
| 41 class SelectedKeywordView; | 41 class SelectedKeywordView; |
| 42 class StarView; | 42 class StarView; |
| 43 | 43 |
| 44 namespace views { |
| 45 class HorizontalPainter; |
| 46 }; |
| 47 |
| 44 ///////////////////////////////////////////////////////////////////////////// | 48 ///////////////////////////////////////////////////////////////////////////// |
| 45 // | 49 // |
| 46 // LocationBarView class | 50 // LocationBarView class |
| 47 // | 51 // |
| 48 // The LocationBarView class is a View subclass that paints the background | 52 // The LocationBarView class is a View subclass that paints the background |
| 49 // of the URL bar strip and contains its content. | 53 // of the URL bar strip and contains its content. |
| 50 // | 54 // |
| 51 ///////////////////////////////////////////////////////////////////////////// | 55 ///////////////////////////////////////////////////////////////////////////// |
| 52 class LocationBarView : public LocationBar, | 56 class LocationBarView : public LocationBar, |
| 53 public LocationBarTesting, | 57 public LocationBarTesting, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 virtual void PopForceHidden(); | 205 virtual void PopForceHidden(); |
| 202 virtual LocationBarTesting* GetLocationBarForTesting() { return this; } | 206 virtual LocationBarTesting* GetLocationBarForTesting() { return this; } |
| 203 | 207 |
| 204 // Overridden from LocationBarTesting: | 208 // Overridden from LocationBarTesting: |
| 205 virtual int PageActionCount() { return page_action_views_.size(); } | 209 virtual int PageActionCount() { return page_action_views_.size(); } |
| 206 virtual int PageActionVisibleCount(); | 210 virtual int PageActionVisibleCount(); |
| 207 virtual ExtensionAction* GetPageAction(size_t index); | 211 virtual ExtensionAction* GetPageAction(size_t index); |
| 208 virtual ExtensionAction* GetVisiblePageAction(size_t index); | 212 virtual ExtensionAction* GetVisiblePageAction(size_t index); |
| 209 virtual void TestPageActionPressed(size_t index); | 213 virtual void TestPageActionPressed(size_t index); |
| 210 | 214 |
| 211 static const int kVertMargin; | 215 static const int kVertMargin; // Space above and below the edit. |
| 216 static const int kEdgeThickness; // Unavailable space at horizontal edges. |
| 217 static const int kItemPadding; // Space between items within the bar. |
| 212 | 218 |
| 213 protected: | 219 protected: |
| 214 void Focus(); | 220 void Focus(); |
| 215 | 221 |
| 216 private: | 222 private: |
| 217 typedef std::vector<ContentSettingImageView*> ContentSettingViews; | 223 typedef std::vector<ContentSettingImageView*> ContentSettingViews; |
| 218 | 224 |
| 219 friend class PageActionImageView; | 225 friend class PageActionImageView; |
| 220 friend class PageActionWithBadgeView; | 226 friend class PageActionWithBadgeView; |
| 221 typedef std::vector<PageActionWithBadgeView*> PageActionViews; | 227 typedef std::vector<PageActionWithBadgeView*> PageActionViews; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 296 |
| 291 // The user's desired disposition for how their input should be opened | 297 // The user's desired disposition for how their input should be opened |
| 292 WindowOpenDisposition disposition_; | 298 WindowOpenDisposition disposition_; |
| 293 | 299 |
| 294 // The transition type to use for the navigation | 300 // The transition type to use for the navigation |
| 295 PageTransition::Type transition_; | 301 PageTransition::Type transition_; |
| 296 | 302 |
| 297 // Font used by edit and some of the hints. | 303 // Font used by edit and some of the hints. |
| 298 gfx::Font font_; | 304 gfx::Font font_; |
| 299 | 305 |
| 306 // An object used to paint the normal-mode background. |
| 307 scoped_ptr<views::HorizontalPainter> painter_; |
| 308 |
| 300 // An icon to the left of the edit field. | 309 // An icon to the left of the edit field. |
| 301 LocationIconView* location_icon_view_; | 310 LocationIconView* location_icon_view_; |
| 302 | 311 |
| 303 // A bubble displayed for EV HTTPS sites. | 312 // A bubble displayed for EV HTTPS sites. |
| 304 EVBubbleView* ev_bubble_view_; | 313 EVBubbleView* ev_bubble_view_; |
| 305 | 314 |
| 306 // Location_entry view wrapper | 315 // Location_entry view wrapper |
| 307 views::NativeViewHost* location_entry_view_; | 316 views::NativeViewHost* location_entry_view_; |
| 308 | 317 |
| 309 // The following views are used to provide hints and remind the user as to | 318 // The following views are used to provide hints and remind the user as to |
| (...skipping 24 matching lines...) Expand all Loading... |
| 334 // We should actually be hidden iff this is greater than zero. | 343 // We should actually be hidden iff this is greater than zero. |
| 335 int force_hidden_count_; | 344 int force_hidden_count_; |
| 336 | 345 |
| 337 // Used schedule a task for the first run info bubble. | 346 // Used schedule a task for the first run info bubble. |
| 338 ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_; | 347 ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_; |
| 339 | 348 |
| 340 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 349 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 341 }; | 350 }; |
| 342 | 351 |
| 343 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 352 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |