| 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_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 void (content::WebContents::*method)()); | 578 void (content::WebContents::*method)()); |
| 579 | 579 |
| 580 // Shows the next app-modal dialog box, if there is one to be shown, or moves | 580 // Shows the next app-modal dialog box, if there is one to be shown, or moves |
| 581 // an existing showing one to the front. | 581 // an existing showing one to the front. |
| 582 void ActivateAppModalDialog() const; | 582 void ActivateAppModalDialog() const; |
| 583 | 583 |
| 584 // Returns the max top arrow height for infobar. | 584 // Returns the max top arrow height for infobar. |
| 585 int GetMaxTopInfoBarArrowHeight(); | 585 int GetMaxTopInfoBarArrowHeight(); |
| 586 | 586 |
| 587 // The BrowserFrame that hosts this view. | 587 // The BrowserFrame that hosts this view. |
| 588 BrowserFrame* frame_; | 588 BrowserFrame* frame_ = nullptr; |
| 589 | 589 |
| 590 // The Browser object we are associated with. | 590 // The Browser object we are associated with. |
| 591 std::unique_ptr<Browser> browser_; | 591 std::unique_ptr<Browser> browser_; |
| 592 | 592 |
| 593 // BrowserView layout (LTR one is pictured here). | 593 // BrowserView layout (LTR one is pictured here). |
| 594 // | 594 // |
| 595 // -------------------------------------------------------------------- | 595 // -------------------------------------------------------------------- |
| 596 // | TopContainerView (top_container_) | | 596 // | TopContainerView (top_container_) | |
| 597 // | -------------------------------------------------------------- | | 597 // | -------------------------------------------------------------- | |
| 598 // | | Tabs (tabstrip_) | | | 598 // | | Tabs (tabstrip_) | | |
| (...skipping 17 matching lines...) Expand all Loading... |
| 616 // | 616 // |
| 617 // [1] The bookmark bar and info bar are swapped when on the new tab page. | 617 // [1] The bookmark bar and info bar are swapped when on the new tab page. |
| 618 // Additionally when the bookmark bar is detached, contents_container_ is | 618 // Additionally when the bookmark bar is detached, contents_container_ is |
| 619 // positioned on top of the bar while the tab's contents are placed below | 619 // positioned on top of the bar while the tab's contents are placed below |
| 620 // the bar. This allows the find bar to always align with the top of | 620 // the bar. This allows the find bar to always align with the top of |
| 621 // contents_container_ regardless if there's bookmark or info bars. | 621 // contents_container_ regardless if there's bookmark or info bars. |
| 622 | 622 |
| 623 // The view that manages the tab strip, toolbar, and sometimes the bookmark | 623 // The view that manages the tab strip, toolbar, and sometimes the bookmark |
| 624 // bar. Stacked top in the view hiearachy so it can be used to slide out | 624 // bar. Stacked top in the view hiearachy so it can be used to slide out |
| 625 // the top views in immersive fullscreen. | 625 // the top views in immersive fullscreen. |
| 626 TopContainerView* top_container_; | 626 TopContainerView* top_container_ = nullptr; |
| 627 | 627 |
| 628 // The TabStrip. | 628 // The TabStrip. |
| 629 TabStrip* tabstrip_; | 629 TabStrip* tabstrip_ = nullptr; |
| 630 | 630 |
| 631 // The Toolbar containing the navigation buttons, menus and the address bar. | 631 // The Toolbar containing the navigation buttons, menus and the address bar. |
| 632 ToolbarView* toolbar_; | 632 ToolbarView* toolbar_ = nullptr; |
| 633 | 633 |
| 634 // The Bookmark Bar View for this window. Lazily created. May be null for | 634 // The Bookmark Bar View for this window. Lazily created. May be null for |
| 635 // non-tabbed browsers like popups. May not be visible. | 635 // non-tabbed browsers like popups. May not be visible. |
| 636 std::unique_ptr<BookmarkBarView> bookmark_bar_view_; | 636 std::unique_ptr<BookmarkBarView> bookmark_bar_view_; |
| 637 | 637 |
| 638 // The do-nothing view which controls the z-order of the find bar widget | 638 // The do-nothing view which controls the z-order of the find bar widget |
| 639 // relative to views which paint into layers and views with an associated | 639 // relative to views which paint into layers and views with an associated |
| 640 // NativeView. | 640 // NativeView. |
| 641 View* find_bar_host_view_; | 641 View* find_bar_host_view_ = nullptr; |
| 642 | 642 |
| 643 // The download shelf view (view at the bottom of the page). | 643 // The download shelf view (view at the bottom of the page). |
| 644 std::unique_ptr<DownloadShelfView> download_shelf_; | 644 std::unique_ptr<DownloadShelfView> download_shelf_; |
| 645 | 645 |
| 646 // The InfoBarContainerView that contains InfoBars for the current tab. | 646 // The InfoBarContainerView that contains InfoBars for the current tab. |
| 647 InfoBarContainerView* infobar_container_; | 647 InfoBarContainerView* infobar_container_ = nullptr; |
| 648 | 648 |
| 649 // The view that contains the selected WebContents. | 649 // The view that contains the selected WebContents. |
| 650 ContentsWebView* contents_web_view_; | 650 ContentsWebView* contents_web_view_ = nullptr; |
| 651 | 651 |
| 652 // The view that contains devtools window for the selected WebContents. | 652 // The view that contains devtools window for the selected WebContents. |
| 653 views::WebView* devtools_web_view_; | 653 views::WebView* devtools_web_view_ = nullptr; |
| 654 | 654 |
| 655 // The view managing the devtools and contents positions. | 655 // The view managing the devtools and contents positions. |
| 656 // Handled by ContentsLayoutManager. | 656 // Handled by ContentsLayoutManager. |
| 657 views::View* contents_container_; | 657 views::View* contents_container_ = nullptr; |
| 658 | 658 |
| 659 // Tracks and stores the last focused view which is not the | 659 // Tracks and stores the last focused view which is not the |
| 660 // devtools_web_view_ or any of its children. Used to restore focus once | 660 // devtools_web_view_ or any of its children. Used to restore focus once |
| 661 // the devtools_web_view_ is hidden. | 661 // the devtools_web_view_ is hidden. |
| 662 std::unique_ptr<views::ExternalFocusTracker> devtools_focus_tracker_; | 662 std::unique_ptr<views::ExternalFocusTracker> devtools_focus_tracker_; |
| 663 | 663 |
| 664 // The Status information bubble that appears at the bottom of the window. | 664 // The Status information bubble that appears at the bottom of the window. |
| 665 std::unique_ptr<StatusBubbleViews> status_bubble_; | 665 std::unique_ptr<StatusBubbleViews> status_bubble_; |
| 666 | 666 |
| 667 // A mapping between accelerators and command IDs. | 667 // A mapping between accelerators and command IDs. |
| 668 std::map<ui::Accelerator, int> accelerator_table_; | 668 std::map<ui::Accelerator, int> accelerator_table_; |
| 669 | 669 |
| 670 // True if we have already been initialized. | 670 // True if we have already been initialized. |
| 671 bool initialized_; | 671 bool initialized_ = false; |
| 672 | 672 |
| 673 // True if we're currently handling a theme change (i.e. inside | 673 // True if we're currently handling a theme change (i.e. inside |
| 674 // OnThemeChanged()). | 674 // OnThemeChanged()). |
| 675 bool handling_theme_changed_; | 675 bool handling_theme_changed_ = false; |
| 676 | 676 |
| 677 // True when in ProcessFullscreen(). The flag is used to avoid reentrance and | 677 // True when in ProcessFullscreen(). The flag is used to avoid reentrance and |
| 678 // to ignore requests to layout while in ProcessFullscreen() to reduce | 678 // to ignore requests to layout while in ProcessFullscreen() to reduce |
| 679 // jankiness. | 679 // jankiness. |
| 680 bool in_process_fullscreen_; | 680 bool in_process_fullscreen_ = false; |
| 681 | 681 |
| 682 std::unique_ptr<ExclusiveAccessBubbleViews> exclusive_access_bubble_; | 682 std::unique_ptr<ExclusiveAccessBubbleViews> exclusive_access_bubble_; |
| 683 | 683 |
| 684 std::unique_ptr<NewBackShortcutBubble> new_back_shortcut_bubble_; | 684 std::unique_ptr<NewBackShortcutBubble> new_back_shortcut_bubble_; |
| 685 base::TimeTicks last_back_shortcut_press_time_; | 685 base::TimeTicks last_back_shortcut_press_time_; |
| 686 | 686 |
| 687 #if defined(OS_WIN) | 687 #if defined(OS_WIN) |
| 688 // Helper class to listen for completion of first page load. | 688 // Helper class to listen for completion of first page load. |
| 689 std::unique_ptr<LoadCompleteListener> load_complete_listener_; | 689 std::unique_ptr<LoadCompleteListener> load_complete_listener_; |
| 690 | 690 |
| 691 // The custom JumpList for Windows 7. | 691 // The custom JumpList for Windows 7. |
| 692 scoped_refptr<JumpList> jumplist_; | 692 scoped_refptr<JumpList> jumplist_; |
| 693 #endif | 693 #endif |
| 694 | 694 |
| 695 // The timer used to update frames for the Loading Animation. | 695 // The timer used to update frames for the Loading Animation. |
| 696 base::RepeatingTimer loading_animation_timer_; | 696 base::RepeatingTimer loading_animation_timer_; |
| 697 | 697 |
| 698 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 698 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 699 | 699 |
| 700 // If this flag is set then SetFocusToLocationBar() will set focus to the | 700 // If this flag is set then SetFocusToLocationBar() will set focus to the |
| 701 // location bar even if the browser window is not active. | 701 // location bar even if the browser window is not active. |
| 702 bool force_location_bar_focus_; | 702 bool force_location_bar_focus_ = false; |
| 703 | 703 |
| 704 std::unique_ptr<ImmersiveModeController> immersive_mode_controller_; | 704 std::unique_ptr<ImmersiveModeController> immersive_mode_controller_; |
| 705 | 705 |
| 706 std::unique_ptr<WebContentsCloseHandler> web_contents_close_handler_; | 706 std::unique_ptr<WebContentsCloseHandler> web_contents_close_handler_; |
| 707 | 707 |
| 708 // The class that registers for keyboard shortcuts for extension commands. | 708 // The class that registers for keyboard shortcuts for extension commands. |
| 709 std::unique_ptr<ExtensionKeybindingRegistryViews> | 709 std::unique_ptr<ExtensionKeybindingRegistryViews> |
| 710 extension_keybinding_registry_; | 710 extension_keybinding_registry_; |
| 711 | 711 |
| 712 std::unique_ptr<BrowserWindowHistogramHelper> histogram_helper_; | 712 std::unique_ptr<BrowserWindowHistogramHelper> histogram_helper_; |
| 713 | 713 |
| 714 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; | 714 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_{ |
| 715 this}; |
| 715 | 716 |
| 716 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 717 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
| 717 }; | 718 }; |
| 718 | 719 |
| 719 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 720 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |