Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 63173016: DevTools: place DevTools WebContents underneath inspected WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the preference. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 #include "chrome/browser/hang_monitor/hung_window_detector.h" 39 #include "chrome/browser/hang_monitor/hung_window_detector.h"
40 #endif 40 #endif
41 41
42 // NOTE: For more information about the objects and files in this directory, 42 // NOTE: For more information about the objects and files in this directory,
43 // view: http://dev.chromium.org/developers/design-documents/browser-window 43 // view: http://dev.chromium.org/developers/design-documents/browser-window
44 44
45 class BookmarkBarView; 45 class BookmarkBarView;
46 class Browser; 46 class Browser;
47 class BrowserViewLayout; 47 class BrowserViewLayout;
48 class ContentsContainer; 48 class ContentsContainer;
49 class DevToolsContainer;
49 class DownloadShelfView; 50 class DownloadShelfView;
50 class FullscreenExitBubbleViews; 51 class FullscreenExitBubbleViews;
51 class InfoBarContainerView; 52 class InfoBarContainerView;
52 class LocationBarView; 53 class LocationBarView;
53 class StatusBubbleViews; 54 class StatusBubbleViews;
54 class SearchViewController; 55 class SearchViewController;
55 class TabStrip; 56 class TabStrip;
56 class TabStripModel; 57 class TabStripModel;
57 class ToolbarView; 58 class ToolbarView;
58 class TopContainerView; 59 class TopContainerView;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 452 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
452 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 453 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
453 454
454 // Overridden from ui::AcceleratorTarget: 455 // Overridden from ui::AcceleratorTarget:
455 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 456 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
456 457
457 // OmniboxPopupModelObserver overrides 458 // OmniboxPopupModelObserver overrides
458 virtual void OnOmniboxPopupShownOrHidden() OVERRIDE; 459 virtual void OnOmniboxPopupShownOrHidden() OVERRIDE;
459 460
460 // Testing interface: 461 // Testing interface:
461 views::SingleSplitView* GetContentsSplitForTest() { return contents_split_; }
462 ContentsContainer* GetContentsContainerForTest() { 462 ContentsContainer* GetContentsContainerForTest() {
463 return contents_container_; 463 return contents_container_;
464 } 464 }
465 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } 465 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }
466 466
467 private: 467 private:
468 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate 468 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
469 // interface to keep these two classes decoupled and testable. 469 // interface to keep these two classes decoupled and testable.
470 friend class BrowserViewLayoutDelegateImpl; 470 friend class BrowserViewLayoutDelegateImpl;
471 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView); 471 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // type, and there should be a subsequent re-layout to show it. 513 // type, and there should be a subsequent re-layout to show it.
514 // |contents| can be NULL. 514 // |contents| can be NULL.
515 bool MaybeShowInfoBar(content::WebContents* contents); 515 bool MaybeShowInfoBar(content::WebContents* contents);
516 516
517 // Updates devtools window for given contents. This method will show docked 517 // Updates devtools window for given contents. This method will show docked
518 // devtools window for inspected |web_contents| that has docked devtools 518 // devtools window for inspected |web_contents| that has docked devtools
519 // and hide it for NULL or not inspected |web_contents|. It will also make 519 // and hide it for NULL or not inspected |web_contents|. It will also make
520 // sure devtools window size and position are restored for given tab. 520 // sure devtools window size and position are restored for given tab.
521 void UpdateDevToolsForContents(content::WebContents* web_contents); 521 void UpdateDevToolsForContents(content::WebContents* web_contents);
522 522
523 // Shows docked devtools.
524 void ShowDevToolsContainer();
525
526 // Hides docked devtools.
527 void HideDevToolsContainer();
528
529 // Reads split position from the current tab's devtools window and applies
530 // it to the devtools split.
531 void UpdateDevToolsSplitPosition();
532
533 // Updates various optional child Views, e.g. Bookmarks Bar, Info Bar or the 523 // Updates various optional child Views, e.g. Bookmarks Bar, Info Bar or the
534 // Download Shelf in response to a change notification from the specified 524 // Download Shelf in response to a change notification from the specified
535 // |contents|. |contents| can be NULL. In this case, all optional UI will be 525 // |contents|. |contents| can be NULL. In this case, all optional UI will be
536 // removed. 526 // removed.
537 void UpdateUIForContents(content::WebContents* contents); 527 void UpdateUIForContents(content::WebContents* contents);
538 528
539 // Invoked to update the necessary things when our fullscreen state changes 529 // Invoked to update the necessary things when our fullscreen state changes
540 // to |fullscreen|. On Windows this is invoked immediately when we toggle the 530 // to |fullscreen|. On Windows this is invoked immediately when we toggle the
541 // full screen state. On Linux changing the fullscreen state is async, so we 531 // full screen state. On Linux changing the fullscreen state is async, so we
542 // ask the window to change its fullscreen state, then when we get 532 // ask the window to change its fullscreen state, then when we get
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 // | -------------------------------------------------------------- | 596 // | -------------------------------------------------------------- |
607 // | | Tabs (tabstrip_) | | 597 // | | Tabs (tabstrip_) | |
608 // | |------------------------------------------------------------| | 598 // | |------------------------------------------------------------| |
609 // | | Navigation buttons, address bar, menu (toolbar_) | | 599 // | | Navigation buttons, address bar, menu (toolbar_) | |
610 // | -------------------------------------------------------------- | 600 // | -------------------------------------------------------------- |
611 // |------------------------------------------------------------------| 601 // |------------------------------------------------------------------|
612 // | All infobars (infobar_container_) [1] | 602 // | All infobars (infobar_container_) [1] |
613 // |------------------------------------------------------------------| 603 // |------------------------------------------------------------------|
614 // | Bookmarks (bookmark_bar_view_) [1] | 604 // | Bookmarks (bookmark_bar_view_) [1] |
615 // |------------------------------------------------------------------| 605 // |------------------------------------------------------------------|
616 // | Debugger splitter (contents_split_) | 606 // | Contents (contents_container_) |
pfeldman 2013/11/18 14:18:27 Now contents_container only contains devtools_cont
dgozman 2013/11/18 14:37:14 Contents container has top offset, which is used f
617 // | -------------------------------------------------------------- | 607 // | -------------------------------------------------------------- |
618 // | | Page content (contents_container_) | | 608 // | | DevTools container (devtools_container_) | |
619 // | | -------------------------------------------------------- | | 609 // | | -------------------------------------------------------- | |
620 // | | | contents_web_view_ | | | 610 // | | | contents_web_view_ | | |
621 // | | -------------------------------------------------------- | | 611 // | | -------------------------------------------------------- | |
622 // | -------------------------------------------------------------- | 612 // | | | devtools_web_view_ | | |
623 // | -------------------------------------------------------------- | 613 // | | -------------------------------------------------------- | |
624 // | | Debugger (devtools_container_) | |
625 // | | | |
626 // | -------------------------------------------------------------- | 614 // | -------------------------------------------------------------- |
627 // |------------------------------------------------------------------| 615 // |------------------------------------------------------------------|
628 // | Active downloads (download_shelf_) | 616 // | Active downloads (download_shelf_) |
629 // -------------------------------------------------------------------- 617 // --------------------------------------------------------------------
630 // 618 //
631 // [1] The bookmark bar and info bar are swapped when on the new tab page. 619 // [1] The bookmark bar and info bar are swapped when on the new tab page.
632 // Additionally when the bookmark bar is detached, contents_container_ is 620 // Additionally when the bookmark bar is detached, contents_container_ is
633 // positioned on top of the bar while the tab's contents are placed below 621 // positioned on top of the bar while the tab's contents are placed below
634 // the bar. This allows the find bar to always align with the top of 622 // the bar. This allows the find bar to always align with the top of
635 // contents_container_ regardless if there's bookmark or info bars. 623 // contents_container_ regardless if there's bookmark or info bars.
(...skipping 26 matching lines...) Expand all
662 // The download shelf view (view at the bottom of the page). 650 // The download shelf view (view at the bottom of the page).
663 scoped_ptr<DownloadShelfView> download_shelf_; 651 scoped_ptr<DownloadShelfView> download_shelf_;
664 652
665 // The InfoBarContainerView that contains InfoBars for the current tab. 653 // The InfoBarContainerView that contains InfoBars for the current tab.
666 InfoBarContainerView* infobar_container_; 654 InfoBarContainerView* infobar_container_;
667 655
668 // The view that contains the selected WebContents. 656 // The view that contains the selected WebContents.
669 views::WebView* contents_web_view_; 657 views::WebView* contents_web_view_;
670 658
671 // The view that contains devtools window for the selected WebContents. 659 // The view that contains devtools window for the selected WebContents.
672 views::WebView* devtools_container_; 660 views::WebView* devtools_web_view_;
673 661
674 // The view managing the |contents_web_view_|. 662 // The view managing devtools and contents windows relative positions.
663 DevToolsContainer* devtools_container_;
664
665 // The view managing the |devtools_container_|.
675 ContentsContainer* contents_container_; 666 ContentsContainer* contents_container_;
676 667
677 // Split view containing the contents container and devtools container.
678 views::SingleSplitView* contents_split_;
679
680 // Side to dock devtools to.
681 DevToolsDockSide devtools_dock_side_;
682
683 // Docked devtools window instance. NULL when current tab is not inspected 668 // Docked devtools window instance. NULL when current tab is not inspected
684 // or is inspected with undocked version of DevToolsWindow. 669 // or is inspected with undocked version of DevToolsWindow.
685 DevToolsWindow* devtools_window_; 670 DevToolsWindow* devtools_window_;
686 671
687 // Tracks and stores the last focused view which is not the 672 // Tracks and stores the last focused view which is not the
688 // devtools_container_ or any of its children. Used to restore focus once 673 // devtools_web_view_ or any of its children. Used to restore focus once
689 // the devtools_container_ is hidden. 674 // the devtools_web_view_ is hidden.
690 scoped_ptr<views::ExternalFocusTracker> devtools_focus_tracker_; 675 scoped_ptr<views::ExternalFocusTracker> devtools_focus_tracker_;
691 676
692 // The Status information bubble that appears at the bottom of the window. 677 // The Status information bubble that appears at the bottom of the window.
693 scoped_ptr<StatusBubbleViews> status_bubble_; 678 scoped_ptr<StatusBubbleViews> status_bubble_;
694 679
695 // A mapping between accelerators and commands. 680 // A mapping between accelerators and commands.
696 std::map<ui::Accelerator, int> accelerator_table_; 681 std::map<ui::Accelerator, int> accelerator_table_;
697 682
698 // True if we have already been initialized. 683 // True if we have already been initialized.
699 bool initialized_; 684 bool initialized_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 scoped_ptr<ScrollEndEffectController> scroll_end_effect_controller_; 728 scoped_ptr<ScrollEndEffectController> scroll_end_effect_controller_;
744 729
745 gfx::ScopedSysColorChangeListener color_change_listener_; 730 gfx::ScopedSysColorChangeListener color_change_listener_;
746 731
747 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; 732 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_;
748 733
749 DISALLOW_COPY_AND_ASSIGN(BrowserView); 734 DISALLOW_COPY_AND_ASSIGN(BrowserView);
750 }; 735 };
751 736
752 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 737 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698