| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "components/search_engines/template_url_service_observer.h" | 23 #include "components/search_engines/template_url_service_observer.h" |
| 24 #include "components/security_state/core/security_state.h" | 24 #include "components/security_state/core/security_state.h" |
| 25 #include "components/zoom/zoom_event_manager_observer.h" | 25 #include "components/zoom/zoom_event_manager_observer.h" |
| 26 #include "ui/gfx/animation/animation_delegate.h" | 26 #include "ui/gfx/animation/animation_delegate.h" |
| 27 #include "ui/gfx/animation/slide_animation.h" | 27 #include "ui/gfx/animation/slide_animation.h" |
| 28 #include "ui/gfx/font.h" | 28 #include "ui/gfx/font.h" |
| 29 #include "ui/gfx/geometry/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
| 30 #include "ui/views/drag_controller.h" | 30 #include "ui/views/drag_controller.h" |
| 31 | 31 |
| 32 class CommandUpdater; | 32 class CommandUpdater; |
| 33 class ContentSettingBubbleDialogTest; |
| 33 class ContentSettingBubbleModelDelegate; | 34 class ContentSettingBubbleModelDelegate; |
| 34 class ContentSettingImageView; | 35 class ContentSettingImageView; |
| 35 class ExtensionAction; | 36 class ExtensionAction; |
| 36 class GURL; | 37 class GURL; |
| 37 class KeywordHintView; | 38 class KeywordHintView; |
| 38 class LocationIconView; | 39 class LocationIconView; |
| 39 class OpenPDFInReaderView; | 40 class OpenPDFInReaderView; |
| 40 class ManagePasswordsIconViews; | 41 class ManagePasswordsIconViews; |
| 41 class PageActionWithBadgeView; | 42 class PageActionWithBadgeView; |
| 42 class PageActionImageView; | 43 class PageActionImageView; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ToolbarModel* GetToolbarModel() override; | 249 ToolbarModel* GetToolbarModel() override; |
| 249 content::WebContents* GetWebContents() override; | 250 content::WebContents* GetWebContents() override; |
| 250 | 251 |
| 251 // ZoomEventManagerObserver: | 252 // ZoomEventManagerObserver: |
| 252 // Updates the view for the zoom icon when default zoom levels change. | 253 // Updates the view for the zoom icon when default zoom levels change. |
| 253 void OnDefaultZoomLevelChanged() override; | 254 void OnDefaultZoomLevelChanged() override; |
| 254 | 255 |
| 255 private: | 256 private: |
| 256 using ContentSettingViews = std::vector<ContentSettingImageView*>; | 257 using ContentSettingViews = std::vector<ContentSettingImageView*>; |
| 257 | 258 |
| 259 friend class ContentSettingBubbleDialogTest; |
| 258 friend class PageActionImageView; | 260 friend class PageActionImageView; |
| 259 friend class PageActionWithBadgeView; | 261 friend class PageActionWithBadgeView; |
| 260 using PageActions = std::vector<ExtensionAction*>; | 262 using PageActions = std::vector<ExtensionAction*>; |
| 261 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; | 263 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; |
| 262 | 264 |
| 263 // Helper for GetMinimumWidth(). Calculates the incremental minimum width | 265 // Helper for GetMinimumWidth(). Calculates the incremental minimum width |
| 264 // |view| should add to the trailing width after the omnibox. | 266 // |view| should add to the trailing width after the omnibox. |
| 265 int IncrementalMinimumWidth(views::View* view) const; | 267 int IncrementalMinimumWidth(views::View* view) const; |
| 266 | 268 |
| 267 // Returns the thickness of any visible edge, in pixels. | 269 // Returns the thickness of any visible edge, in pixels. |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 const OmniboxView* GetOmniboxView() const override; | 358 const OmniboxView* GetOmniboxView() const override; |
| 357 LocationBarTesting* GetLocationBarForTesting() override; | 359 LocationBarTesting* GetLocationBarForTesting() override; |
| 358 | 360 |
| 359 // LocationBarTesting: | 361 // LocationBarTesting: |
| 360 int PageActionCount() override; | 362 int PageActionCount() override; |
| 361 int PageActionVisibleCount() override; | 363 int PageActionVisibleCount() override; |
| 362 ExtensionAction* GetPageAction(size_t index) override; | 364 ExtensionAction* GetPageAction(size_t index) override; |
| 363 ExtensionAction* GetVisiblePageAction(size_t index) override; | 365 ExtensionAction* GetVisiblePageAction(size_t index) override; |
| 364 void TestPageActionPressed(size_t index) override; | 366 void TestPageActionPressed(size_t index) override; |
| 365 bool GetBookmarkStarVisibility() override; | 367 bool GetBookmarkStarVisibility() override; |
| 368 int ContentSettingImageModelCount() override; |
| 369 ContentSettingImageModel* GetContentSettingImageModel(size_t index) override; |
| 366 | 370 |
| 367 // views::View: | 371 // views::View: |
| 368 const char* GetClassName() const override; | 372 const char* GetClassName() const override; |
| 369 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 373 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| 370 void OnFocus() override; | 374 void OnFocus() override; |
| 371 void OnPaint(gfx::Canvas* canvas) override; | 375 void OnPaint(gfx::Canvas* canvas) override; |
| 372 | 376 |
| 373 // views::DragController: | 377 // views::DragController: |
| 374 void WriteDragDataForView(View* sender, | 378 void WriteDragDataForView(View* sender, |
| 375 const gfx::Point& press_pt, | 379 const gfx::Point& press_pt, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 386 // ChromeOmniboxEditController: | 390 // ChromeOmniboxEditController: |
| 387 void OnChanged() override; | 391 void OnChanged() override; |
| 388 const ToolbarModel* GetToolbarModel() const override; | 392 const ToolbarModel* GetToolbarModel() const override; |
| 389 | 393 |
| 390 // DropdownBarHostDelegate: | 394 // DropdownBarHostDelegate: |
| 391 void SetFocusAndSelection(bool select_all) override; | 395 void SetFocusAndSelection(bool select_all) override; |
| 392 | 396 |
| 393 // TemplateURLServiceObserver: | 397 // TemplateURLServiceObserver: |
| 394 void OnTemplateURLServiceChanged() override; | 398 void OnTemplateURLServiceChanged() override; |
| 395 | 399 |
| 400 // For a given ContentSettingImageModel, return the corresponding |
| 401 // ContentSettingImageView. |
| 402 ContentSettingImageView* GetContentSettingImageViewFromImageModel( |
| 403 ContentSettingImageModel* image_model); |
| 404 |
| 396 // The Browser this LocationBarView is in. Note that at least | 405 // The Browser this LocationBarView is in. Note that at least |
| 397 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser | 406 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser |
| 398 // window, so this may be NULL. | 407 // window, so this may be NULL. |
| 399 Browser* browser_; | 408 Browser* browser_; |
| 400 | 409 |
| 401 OmniboxViewViews* omnibox_view_; | 410 OmniboxViewViews* omnibox_view_; |
| 402 | 411 |
| 403 // Our delegate. | 412 // Our delegate. |
| 404 Delegate* delegate_; | 413 Delegate* delegate_; |
| 405 | 414 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 BooleanPrefMember edit_bookmarks_enabled_; | 477 BooleanPrefMember edit_bookmarks_enabled_; |
| 469 | 478 |
| 470 // This is a debug state variable that stores if the WebContents was null | 479 // This is a debug state variable that stores if the WebContents was null |
| 471 // during the last RefreshPageAction. | 480 // during the last RefreshPageAction. |
| 472 bool web_contents_null_at_last_refresh_; | 481 bool web_contents_null_at_last_refresh_; |
| 473 | 482 |
| 474 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 483 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 475 }; | 484 }; |
| 476 | 485 |
| 477 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 486 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |