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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 static const int kBubblePadding; | 285 static const int kBubblePadding; |
286 | 286 |
287 private: | 287 private: |
288 typedef std::vector<ContentSettingImageView*> ContentSettingViews; | 288 typedef std::vector<ContentSettingImageView*> ContentSettingViews; |
289 | 289 |
290 friend class PageActionImageView; | 290 friend class PageActionImageView; |
291 friend class PageActionWithBadgeView; | 291 friend class PageActionWithBadgeView; |
292 typedef std::vector<ExtensionAction*> PageActions; | 292 typedef std::vector<ExtensionAction*> PageActions; |
293 typedef std::vector<PageActionWithBadgeView*> PageActionViews; | 293 typedef std::vector<PageActionWithBadgeView*> PageActionViews; |
294 | 294 |
| 295 // Helper for GetMinimumWidth(). Calculates the incremental minimum width |
| 296 // |view| should add to the trailing width after the omnibox. |
| 297 static int IncrementalMinimumWidth(views::View* view); |
| 298 |
295 // Returns the thickness of any visible left and right edge, in pixels. | 299 // Returns the thickness of any visible left and right edge, in pixels. |
296 int GetHorizontalEdgeThickness() const; | 300 int GetHorizontalEdgeThickness() const; |
297 | 301 |
298 // The same, but for the top and bottom edges. | 302 // The same, but for the top and bottom edges. |
299 int vertical_edge_thickness() const { | 303 int vertical_edge_thickness() const { |
300 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; | 304 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; |
301 } | 305 } |
302 | 306 |
303 // Updates the visibility state of the Content Blocked icons to reflect what | 307 // Updates the visibility state of the Content Blocked icons to reflect what |
304 // is actually blocked on the current page. Returns true if the visibility | 308 // is actually blocked on the current page. Returns true if the visibility |
(...skipping 25 matching lines...) Expand all Loading... |
330 void ShowFirstRunBubbleInternal(); | 334 void ShowFirstRunBubbleInternal(); |
331 | 335 |
332 // Handles a request to change the value of this text field from software | 336 // Handles a request to change the value of this text field from software |
333 // using an accessibility API (typically automation software, screen readers | 337 // using an accessibility API (typically automation software, screen readers |
334 // don't normally use this). Sets the value and clears the selection. | 338 // don't normally use this). Sets the value and clears the selection. |
335 void AccessibilitySetValue(const base::string16& new_value); | 339 void AccessibilitySetValue(const base::string16& new_value); |
336 | 340 |
337 // Returns true if the suggest text is valid. | 341 // Returns true if the suggest text is valid. |
338 bool HasValidSuggestText() const; | 342 bool HasValidSuggestText() const; |
339 | 343 |
| 344 bool ShouldShowKeywordBubble() const; |
| 345 bool ShouldShowEVBubble() const; |
| 346 |
340 // Origin chip animation control methods. | 347 // Origin chip animation control methods. |
341 void OnShowURLAnimationEnded(); | 348 void OnShowURLAnimationEnded(); |
342 void OnHideURLAnimationEnded(); | 349 void OnHideURLAnimationEnded(); |
343 | 350 |
344 // LocationBar: | 351 // LocationBar: |
345 virtual void ShowFirstRunBubble() OVERRIDE; | 352 virtual void ShowFirstRunBubble() OVERRIDE; |
346 virtual GURL GetDestinationURL() const OVERRIDE; | 353 virtual GURL GetDestinationURL() const OVERRIDE; |
347 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; | 354 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; |
348 virtual content::PageTransition GetPageTransition() const OVERRIDE; | 355 virtual content::PageTransition GetPageTransition() const OVERRIDE; |
349 virtual void AcceptInput() OVERRIDE; | 356 virtual void AcceptInput() OVERRIDE; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 // Used to register for notifications received by NotificationObserver. | 532 // Used to register for notifications received by NotificationObserver. |
526 content::NotificationRegistrar registrar_; | 533 content::NotificationRegistrar registrar_; |
527 | 534 |
528 // Used to bind callback functions to this object. | 535 // Used to bind callback functions to this object. |
529 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; | 536 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; |
530 | 537 |
531 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 538 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
532 }; | 539 }; |
533 | 540 |
534 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 541 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |