| 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 ManagePasswordsIconViews; | 40 class ManagePasswordsIconViews; |
| 40 class PageActionWithBadgeView; | 41 class PageActionWithBadgeView; |
| 41 class PageActionImageView; | 42 class PageActionImageView; |
| 42 class Profile; | 43 class Profile; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 ToolbarModel* GetToolbarModel() override; | 248 ToolbarModel* GetToolbarModel() override; |
| 248 content::WebContents* GetWebContents() override; | 249 content::WebContents* GetWebContents() override; |
| 249 | 250 |
| 250 // ZoomEventManagerObserver: | 251 // ZoomEventManagerObserver: |
| 251 // Updates the view for the zoom icon when default zoom levels change. | 252 // Updates the view for the zoom icon when default zoom levels change. |
| 252 void OnDefaultZoomLevelChanged() override; | 253 void OnDefaultZoomLevelChanged() override; |
| 253 | 254 |
| 254 private: | 255 private: |
| 255 using ContentSettingViews = std::vector<ContentSettingImageView*>; | 256 using ContentSettingViews = std::vector<ContentSettingImageView*>; |
| 256 | 257 |
| 258 friend class ContentSettingBubbleDialogTest; |
| 257 friend class PageActionImageView; | 259 friend class PageActionImageView; |
| 258 friend class PageActionWithBadgeView; | 260 friend class PageActionWithBadgeView; |
| 259 using PageActions = std::vector<ExtensionAction*>; | 261 using PageActions = std::vector<ExtensionAction*>; |
| 260 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; | 262 using PageActionViews = std::vector<std::unique_ptr<PageActionWithBadgeView>>; |
| 261 | 263 |
| 262 // Helper for GetMinimumWidth(). Calculates the incremental minimum width | 264 // Helper for GetMinimumWidth(). Calculates the incremental minimum width |
| 263 // |view| should add to the trailing width after the omnibox. | 265 // |view| should add to the trailing width after the omnibox. |
| 264 int IncrementalMinimumWidth(views::View* view) const; | 266 int IncrementalMinimumWidth(views::View* view) const; |
| 265 | 267 |
| 266 // Returns the thickness of any visible edge, in pixels. | 268 // Returns the thickness of any visible edge, in pixels. |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 const OmniboxView* GetOmniboxView() const override; | 356 const OmniboxView* GetOmniboxView() const override; |
| 355 LocationBarTesting* GetLocationBarForTesting() override; | 357 LocationBarTesting* GetLocationBarForTesting() override; |
| 356 | 358 |
| 357 // LocationBarTesting: | 359 // LocationBarTesting: |
| 358 int PageActionCount() override; | 360 int PageActionCount() override; |
| 359 int PageActionVisibleCount() override; | 361 int PageActionVisibleCount() override; |
| 360 ExtensionAction* GetPageAction(size_t index) override; | 362 ExtensionAction* GetPageAction(size_t index) override; |
| 361 ExtensionAction* GetVisiblePageAction(size_t index) override; | 363 ExtensionAction* GetVisiblePageAction(size_t index) override; |
| 362 void TestPageActionPressed(size_t index) override; | 364 void TestPageActionPressed(size_t index) override; |
| 363 bool GetBookmarkStarVisibility() override; | 365 bool GetBookmarkStarVisibility() override; |
| 366 int ContentSettingImageModelCount() override; |
| 367 ContentSettingImageModel* GetContentSettingImageModel(size_t index) override; |
| 364 | 368 |
| 365 // views::View: | 369 // views::View: |
| 366 const char* GetClassName() const override; | 370 const char* GetClassName() const override; |
| 367 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | 371 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| 368 void OnFocus() override; | 372 void OnFocus() override; |
| 369 void OnPaint(gfx::Canvas* canvas) override; | 373 void OnPaint(gfx::Canvas* canvas) override; |
| 370 | 374 |
| 371 // views::DragController: | 375 // views::DragController: |
| 372 void WriteDragDataForView(View* sender, | 376 void WriteDragDataForView(View* sender, |
| 373 const gfx::Point& press_pt, | 377 const gfx::Point& press_pt, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 384 // ChromeOmniboxEditController: | 388 // ChromeOmniboxEditController: |
| 385 void OnChanged() override; | 389 void OnChanged() override; |
| 386 const ToolbarModel* GetToolbarModel() const override; | 390 const ToolbarModel* GetToolbarModel() const override; |
| 387 | 391 |
| 388 // DropdownBarHostDelegate: | 392 // DropdownBarHostDelegate: |
| 389 void SetFocusAndSelection(bool select_all) override; | 393 void SetFocusAndSelection(bool select_all) override; |
| 390 | 394 |
| 391 // TemplateURLServiceObserver: | 395 // TemplateURLServiceObserver: |
| 392 void OnTemplateURLServiceChanged() override; | 396 void OnTemplateURLServiceChanged() override; |
| 393 | 397 |
| 398 // For a given ContentSettingImageModel, return the corresponding |
| 399 // ContentSettingImageView. |
| 400 ContentSettingImageView* GetContentSettingImageViewFromImageModel( |
| 401 ContentSettingImageModel* image_model); |
| 402 |
| 394 // The Browser this LocationBarView is in. Note that at least | 403 // The Browser this LocationBarView is in. Note that at least |
| 395 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser | 404 // chromeos::SimpleWebViewDialog uses a LocationBarView outside any browser |
| 396 // window, so this may be NULL. | 405 // window, so this may be NULL. |
| 397 Browser* browser_; | 406 Browser* browser_; |
| 398 | 407 |
| 399 OmniboxViewViews* omnibox_view_; | 408 OmniboxViewViews* omnibox_view_; |
| 400 | 409 |
| 401 // Our delegate. | 410 // Our delegate. |
| 402 Delegate* delegate_; | 411 Delegate* delegate_; |
| 403 | 412 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 BooleanPrefMember edit_bookmarks_enabled_; | 472 BooleanPrefMember edit_bookmarks_enabled_; |
| 464 | 473 |
| 465 // This is a debug state variable that stores if the WebContents was null | 474 // This is a debug state variable that stores if the WebContents was null |
| 466 // during the last RefreshPageAction. | 475 // during the last RefreshPageAction. |
| 467 bool web_contents_null_at_last_refresh_; | 476 bool web_contents_null_at_last_refresh_; |
| 468 | 477 |
| 469 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 478 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 470 }; | 479 }; |
| 471 | 480 |
| 472 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 481 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |