| 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 26 matching lines...) Expand all Loading... |
| 37 class ExtensionAction; | 37 class ExtensionAction; |
| 38 class GURL; | 38 class GURL; |
| 39 class InstantController; | 39 class InstantController; |
| 40 class KeywordHintView; | 40 class KeywordHintView; |
| 41 class LocationIconView; | 41 class LocationIconView; |
| 42 class OpenPDFInReaderView; | 42 class OpenPDFInReaderView; |
| 43 class ManagePasswordsIconViews; | 43 class ManagePasswordsIconViews; |
| 44 class PageActionWithBadgeView; | 44 class PageActionWithBadgeView; |
| 45 class PageActionImageView; | 45 class PageActionImageView; |
| 46 class Profile; | 46 class Profile; |
| 47 class SaveCreditCardIconView; |
| 47 class SelectedKeywordView; | 48 class SelectedKeywordView; |
| 48 class StarView; | 49 class StarView; |
| 49 class TemplateURLService; | 50 class TemplateURLService; |
| 50 class TranslateIconView; | 51 class TranslateIconView; |
| 51 class ZoomView; | 52 class ZoomView; |
| 52 | 53 |
| 53 namespace views { | 54 namespace views { |
| 54 class BubbleDelegateView; | 55 class BubbleDelegateView; |
| 55 class ImageButton; | 56 class ImageButton; |
| 56 class ImageView; | 57 class ImageView; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 169 |
| 169 // Retrieves the PageAction View which is associated with |page_action|. | 170 // Retrieves the PageAction View which is associated with |page_action|. |
| 170 PageActionWithBadgeView* GetPageActionView(ExtensionAction* page_action); | 171 PageActionWithBadgeView* GetPageActionView(ExtensionAction* page_action); |
| 171 | 172 |
| 172 // Toggles the star on or off. | 173 // Toggles the star on or off. |
| 173 void SetStarToggled(bool on); | 174 void SetStarToggled(bool on); |
| 174 | 175 |
| 175 // The star. It may not be visible. | 176 // The star. It may not be visible. |
| 176 StarView* star_view() { return star_view_; } | 177 StarView* star_view() { return star_view_; } |
| 177 | 178 |
| 179 // The save credit card icon. It may not be visible. |
| 180 SaveCreditCardIconView* save_credit_card_icon_view() { |
| 181 return save_credit_card_icon_view_; |
| 182 } |
| 183 |
| 178 // Toggles the translate icon on or off. | 184 // Toggles the translate icon on or off. |
| 179 void SetTranslateIconToggled(bool on); | 185 void SetTranslateIconToggled(bool on); |
| 180 | 186 |
| 181 // The translate icon. It may not be visible. | 187 // The translate icon. It may not be visible. |
| 182 TranslateIconView* translate_icon_view() { return translate_icon_view_; } | 188 TranslateIconView* translate_icon_view() { return translate_icon_view_; } |
| 183 | 189 |
| 184 // Returns the screen coordinates of the omnibox (where the URL text appears, | 190 // Returns the screen coordinates of the omnibox (where the URL text appears, |
| 185 // not where the icons are shown). | 191 // not where the icons are shown). |
| 186 gfx::Point GetOmniboxViewOrigin() const; | 192 gfx::Point GetOmniboxViewOrigin() const; |
| 187 | 193 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 bool RefreshPageActionViews(); | 301 bool RefreshPageActionViews(); |
| 296 | 302 |
| 297 // Whether the page actions represented by |page_action_views_| differ | 303 // Whether the page actions represented by |page_action_views_| differ |
| 298 // in ordering or value from |page_actions|. | 304 // in ordering or value from |page_actions|. |
| 299 bool PageActionsDiffer(const PageActions& page_actions) const; | 305 bool PageActionsDiffer(const PageActions& page_actions) const; |
| 300 | 306 |
| 301 // Updates the view for the zoom icon based on the current tab's zoom. Returns | 307 // Updates the view for the zoom icon based on the current tab's zoom. Returns |
| 302 // true if the visibility of the view changed. | 308 // true if the visibility of the view changed. |
| 303 bool RefreshZoomView(); | 309 bool RefreshZoomView(); |
| 304 | 310 |
| 311 // Updates |save_credit_card_icon_view_|. Returns true if visibility changed. |
| 312 bool RefreshSaveCreditCardIconView(); |
| 313 |
| 305 // Updates the Translate icon based on the current tab's Translate status. | 314 // Updates the Translate icon based on the current tab's Translate status. |
| 306 void RefreshTranslateIcon(); | 315 void RefreshTranslateIcon(); |
| 307 | 316 |
| 308 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. | 317 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. |
| 309 bool RefreshManagePasswordsIconView(); | 318 bool RefreshManagePasswordsIconView(); |
| 310 | 319 |
| 311 // Helper to show the first run info bubble. | 320 // Helper to show the first run info bubble. |
| 312 void ShowFirstRunBubbleInternal(); | 321 void ShowFirstRunBubbleInternal(); |
| 313 | 322 |
| 314 // Returns true if the suggest text is valid. | 323 // Returns true if the suggest text is valid. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 329 | 338 |
| 330 // LocationBar: | 339 // LocationBar: |
| 331 void ShowFirstRunBubble() override; | 340 void ShowFirstRunBubble() override; |
| 332 GURL GetDestinationURL() const override; | 341 GURL GetDestinationURL() const override; |
| 333 WindowOpenDisposition GetWindowOpenDisposition() const override; | 342 WindowOpenDisposition GetWindowOpenDisposition() const override; |
| 334 ui::PageTransition GetPageTransition() const override; | 343 ui::PageTransition GetPageTransition() const override; |
| 335 void AcceptInput() override; | 344 void AcceptInput() override; |
| 336 void FocusSearch() override; | 345 void FocusSearch() override; |
| 337 void UpdateContentSettingsIcons() override; | 346 void UpdateContentSettingsIcons() override; |
| 338 void UpdateManagePasswordsIconAndBubble() override; | 347 void UpdateManagePasswordsIconAndBubble() override; |
| 348 void UpdateSaveCreditCardIcon() override; |
| 339 void UpdatePageActions() override; | 349 void UpdatePageActions() override; |
| 340 void UpdateBookmarkStarVisibility() override; | 350 void UpdateBookmarkStarVisibility() override; |
| 341 void UpdateLocationBarVisibility(bool visible, bool animation) override; | 351 void UpdateLocationBarVisibility(bool visible, bool animation) override; |
| 342 bool ShowPageActionPopup(const extensions::Extension* extension, | 352 bool ShowPageActionPopup(const extensions::Extension* extension, |
| 343 bool grant_active_tab) override; | 353 bool grant_active_tab) override; |
| 344 void UpdateOpenPDFInReaderPrompt() override; | 354 void UpdateOpenPDFInReaderPrompt() override; |
| 345 void SaveStateToContents(content::WebContents* contents) override; | 355 void SaveStateToContents(content::WebContents* contents) override; |
| 346 const OmniboxView* GetOmniboxView() const override; | 356 const OmniboxView* GetOmniboxView() const override; |
| 347 LocationBarTesting* GetLocationBarForTesting() override; | 357 LocationBarTesting* GetLocationBarForTesting() override; |
| 348 | 358 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 455 |
| 446 // The icon to open a PDF in Reader. | 456 // The icon to open a PDF in Reader. |
| 447 OpenPDFInReaderView* open_pdf_in_reader_view_; | 457 OpenPDFInReaderView* open_pdf_in_reader_view_; |
| 448 | 458 |
| 449 // The manage passwords icon. | 459 // The manage passwords icon. |
| 450 ManagePasswordsIconViews* manage_passwords_icon_view_; | 460 ManagePasswordsIconViews* manage_passwords_icon_view_; |
| 451 | 461 |
| 452 // The page action icon views. | 462 // The page action icon views. |
| 453 PageActionViews page_action_views_; | 463 PageActionViews page_action_views_; |
| 454 | 464 |
| 465 // The save credit card icon. |
| 466 SaveCreditCardIconView* save_credit_card_icon_view_; |
| 467 |
| 455 // The icon for Translate. | 468 // The icon for Translate. |
| 456 TranslateIconView* translate_icon_view_; | 469 TranslateIconView* translate_icon_view_; |
| 457 | 470 |
| 458 // The star. | 471 // The star. |
| 459 StarView* star_view_; | 472 StarView* star_view_; |
| 460 | 473 |
| 461 // Animation to control showing / hiding the location bar. | 474 // Animation to control showing / hiding the location bar. |
| 462 gfx::SlideAnimation size_animation_; | 475 gfx::SlideAnimation size_animation_; |
| 463 | 476 |
| 464 // Whether we're in popup mode. This value also controls whether the location | 477 // Whether we're in popup mode. This value also controls whether the location |
| (...skipping 18 matching lines...) Expand all Loading... |
| 483 int dropdown_animation_offset_; | 496 int dropdown_animation_offset_; |
| 484 | 497 |
| 485 // This is a debug state variable that stores if the WebContents was null | 498 // This is a debug state variable that stores if the WebContents was null |
| 486 // during the last RefreshPageAction. | 499 // during the last RefreshPageAction. |
| 487 bool web_contents_null_at_last_refresh_; | 500 bool web_contents_null_at_last_refresh_; |
| 488 | 501 |
| 489 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 502 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 490 }; | 503 }; |
| 491 | 504 |
| 492 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 505 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |