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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 public ui::AcceleratorProvider, | 92 public ui::AcceleratorProvider, |
93 public views::WidgetDelegate, | 93 public views::WidgetDelegate, |
94 public views::WidgetObserver, | 94 public views::WidgetObserver, |
95 public views::ClientView, | 95 public views::ClientView, |
96 public InfoBarContainer::Delegate, | 96 public InfoBarContainer::Delegate, |
97 public views::SingleSplitViewListener, | 97 public views::SingleSplitViewListener, |
98 public gfx::SysColorChangeListener { | 98 public gfx::SysColorChangeListener { |
99 public: | 99 public: |
100 // The browser view's class name. | 100 // The browser view's class name. |
101 static const char kViewClassName[]; | 101 static const char kViewClassName[]; |
102 // Initial child indices for well-known views. | |
103 static const int kTabstripIndex; | |
104 static const int kInfoBarIndex; | |
105 static const int kToolbarIndex; | |
102 | 106 |
103 explicit BrowserView(Browser* browser); | 107 explicit BrowserView(Browser* browser); |
104 virtual ~BrowserView(); | 108 virtual ~BrowserView(); |
105 | 109 |
106 void set_frame(BrowserFrame* frame) { frame_ = frame; } | 110 void set_frame(BrowserFrame* frame) { frame_ = frame; } |
107 BrowserFrame* frame() const { return frame_; } | 111 BrowserFrame* frame() const { return frame_; } |
108 | 112 |
109 #if defined(OS_WIN) || defined(USE_AURA) | 113 #if defined(OS_WIN) || defined(USE_AURA) |
110 // Returns a pointer to the BrowserView* interface implementation (an | 114 // Returns a pointer to the BrowserView* interface implementation (an |
111 // instance of this object, typically) for a given native window, or NULL if | 115 // instance of this object, typically) for a given native window, or NULL if |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
570 int last_focused_view_storage_id_; | 574 int last_focused_view_storage_id_; |
571 | 575 |
572 // The BrowserFrame that hosts this view. | 576 // The BrowserFrame that hosts this view. |
573 BrowserFrame* frame_; | 577 BrowserFrame* frame_; |
574 | 578 |
575 // The Browser object we are associated with. | 579 // The Browser object we are associated with. |
576 scoped_ptr<Browser> browser_; | 580 scoped_ptr<Browser> browser_; |
577 | 581 |
578 // BrowserView layout (LTR one is pictured here). | 582 // BrowserView layout (LTR one is pictured here). |
579 // | 583 // |
580 // ---------------------------------------------------------------- | 584 // -------------------------------------------------------------------- |
581 // | Tabs (1) | | 585 // | Tabs (tabstrip_) | |
582 // |--------------------------------------------------------------| | 586 // |------------------------------------------------------------------| |
583 // | Navigation buttons, menus and the address bar (toolbar_) | | 587 // | Navigation buttons, menus and the address bar (toolbar_) | |
584 // |--------------------------------------------------------------| | 588 // |------------------------------------------------------------------| |
585 // | All infobars (infobar_container_) * | | 589 // | All infobars (infobar_container_) * | |
586 // |--------------------------------------------------------------| | 590 // |------------------------------------------------------------------| |
587 // | Bookmarks (bookmark_bar_view_) * | | 591 // | Bookmarks (bookmark_bar_view_) * | |
588 // |--------------------------------------------------------------| | 592 // |------------------------------------------------------------------| |
589 // |Page content (contents_) || | 593 // | Debugger splitter (contents_split_) | |
590 // |-------------------------------------------------------------|| | 594 // | +------------------------------------------------------------+ | |
591 // || contents_container_ and/or ||| | 595 // | | Page content (contents_) | | |
592 // || preview_controller_->preview_container_ ||| | 596 // | | +------------------------------------------------------+ | | |
593 // || ||| | 597 // | | | contents_container_ and/or | | | |
594 // || ||| | 598 // | | | preview_controller_->preview_container_ | | | |
595 // || ||| | 599 // | | | | | | |
596 // || ||| | 600 // | | | | | | |
597 // || ||| | 601 // | | +------------------------------------------------------+ | | |
598 // |-------------------------------------------------------------|| | 602 // | +------------------------------------------------------------+ | |
599 // |==(2)=========================================================| | 603 // | +------------------------------------------------------------+ | |
600 // | | | 604 // | | Debugger (devtools_container_) | | |
601 // | | | 605 // | | | | |
602 // | Debugger (devtools_container_) | | 606 // | +------------------------------------------------------------+ | |
603 // | | | 607 // |------------------------------------------------------------------| |
604 // | | | 608 // | Active downloads (download_shelf_) | |
605 // |--------------------------------------------------------------| | 609 // -------------------------------------------------------------------- |
606 // | Active downloads (download_shelf_) | | |
607 // ---------------------------------------------------------------- | |
608 // | |
609 // (1) - tabstrip_, default position | |
610 // (2) - contents_split_ | |
611 // | 610 // |
sky
2012/11/29 19:30:23
Can you also add a comment about reveal mode.
James Cook
2012/11/29 21:20:59
Done.
| |
612 // * - The bookmark bar and info bar are swapped when on the new tab page. | 611 // * - The bookmark bar and info bar are swapped when on the new tab page. |
613 // Additionally contents_ is positioned on top of the bookmark bar when | 612 // Additionally contents_ is positioned on top of the bookmark bar when |
614 // the bookmark bar is detached. This is done to allow the | 613 // the bookmark bar is detached. This is done to allow the |
615 // preview_controller_->preview_container_ to appear over the bookmark | 614 // preview_controller_->preview_container_ to appear over the bookmark |
616 // bar. | 615 // bar. |
617 | 616 |
618 // Tool/Info bars that we are currently showing. Used for layout. | 617 // Tool/Info bars that we are currently showing. Used for layout. |
619 // active_bookmark_bar_ is either NULL, if the bookmark bar isn't showing, | 618 // active_bookmark_bar_ is either NULL, if the bookmark bar isn't showing, |
620 // or is bookmark_bar_view_ if the bookmark bar is showing. | 619 // or is bookmark_bar_view_ if the bookmark bar is showing. |
621 views::View* active_bookmark_bar_; | 620 views::View* active_bookmark_bar_; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
721 gfx::ScopedSysColorChangeListener color_change_listener_; | 720 gfx::ScopedSysColorChangeListener color_change_listener_; |
722 | 721 |
723 scoped_ptr<InstantPreviewControllerViews> preview_controller_; | 722 scoped_ptr<InstantPreviewControllerViews> preview_controller_; |
724 | 723 |
725 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; | 724 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; |
726 | 725 |
727 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 726 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
728 }; | 727 }; |
729 | 728 |
730 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 729 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |