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 24 matching lines...) Expand all Loading... |
35 #include "chrome/browser/hang_monitor/hung_plugin_action.h" | 35 #include "chrome/browser/hang_monitor/hung_plugin_action.h" |
36 #include "chrome/browser/hang_monitor/hung_window_detector.h" | 36 #include "chrome/browser/hang_monitor/hung_window_detector.h" |
37 #endif | 37 #endif |
38 | 38 |
39 // NOTE: For more information about the objects and files in this directory, | 39 // NOTE: For more information about the objects and files in this directory, |
40 // view: http://dev.chromium.org/developers/design-documents/browser-window | 40 // view: http://dev.chromium.org/developers/design-documents/browser-window |
41 | 41 |
42 class BookmarkBarView; | 42 class BookmarkBarView; |
43 class Browser; | 43 class Browser; |
44 class BrowserViewLayout; | 44 class BrowserViewLayout; |
| 45 class BrowserViewLayoutDelegate; |
45 class ContentsContainer; | 46 class ContentsContainer; |
46 class DownloadShelfView; | 47 class DownloadShelfView; |
47 class FullscreenExitBubbleViews; | 48 class FullscreenExitBubbleViews; |
48 class ImmersiveModeController; | 49 class ImmersiveModeController; |
49 class InfoBarContainerView; | 50 class InfoBarContainerView; |
50 class InstantOverlayControllerViews; | 51 class InstantOverlayControllerViews; |
51 class LocationBarView; | 52 class LocationBarView; |
52 class OverlayContainer; | 53 class OverlayContainer; |
53 class StatusBubbleViews; | 54 class StatusBubbleViews; |
54 class SearchViewController; | 55 class SearchViewController; |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 views::SingleSplitView* GetContentsSplitForTest() { return contents_split_; } | 454 views::SingleSplitView* GetContentsSplitForTest() { return contents_split_; } |
454 ContentsContainer* GetContentsContainerForTest() { | 455 ContentsContainer* GetContentsContainerForTest() { |
455 return contents_container_; | 456 return contents_container_; |
456 } | 457 } |
457 OverlayContainer* GetOverlayContainerForTest() { | 458 OverlayContainer* GetOverlayContainerForTest() { |
458 return overlay_container_; | 459 return overlay_container_; |
459 } | 460 } |
460 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } | 461 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } |
461 | 462 |
462 private: | 463 private: |
463 friend class BrowserViewLayout; | 464 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate |
| 465 // interface to keep these two classes decoupled and testable. |
| 466 friend class BrowserViewLayoutDelegateImpl; |
464 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView); | 467 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView); |
465 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, | 468 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, |
466 TestAboutChromeViewAccObj); | 469 TestAboutChromeViewAccObj); |
467 | 470 |
468 enum FullscreenType { | 471 enum FullscreenType { |
469 FOR_DESKTOP, | 472 FOR_DESKTOP, |
470 FOR_METRO | 473 FOR_METRO |
471 }; | 474 }; |
472 | 475 |
473 // We store this on linux because we must call ProcessFullscreen() | 476 // We store this on linux because we must call ProcessFullscreen() |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 609 |
607 // Last focused view that issued a tab traversal. | 610 // Last focused view that issued a tab traversal. |
608 int last_focused_view_storage_id_; | 611 int last_focused_view_storage_id_; |
609 | 612 |
610 // The BrowserFrame that hosts this view. | 613 // The BrowserFrame that hosts this view. |
611 BrowserFrame* frame_; | 614 BrowserFrame* frame_; |
612 | 615 |
613 // The Browser object we are associated with. | 616 // The Browser object we are associated with. |
614 scoped_ptr<Browser> browser_; | 617 scoped_ptr<Browser> browser_; |
615 | 618 |
| 619 // Delegate implementation for BrowserViewLayout. Exists as a member because |
| 620 // some methods have the same names as BrowserWindow overrides. |
| 621 scoped_ptr<BrowserViewLayoutDelegate> layout_delegate_; |
| 622 |
616 // BrowserView layout (LTR one is pictured here). | 623 // BrowserView layout (LTR one is pictured here). |
617 // | 624 // |
618 // -------------------------------------------------------------------- | 625 // -------------------------------------------------------------------- |
619 // | TopContainerView (top_container_) | | 626 // | TopContainerView (top_container_) | |
620 // | -------------------------------------------------------------- | | 627 // | -------------------------------------------------------------- | |
621 // | | Tabs (tabstrip_) | | | 628 // | | Tabs (tabstrip_) | | |
622 // | |------------------------------------------------------------| | | 629 // | |------------------------------------------------------------| | |
623 // | | Navigation buttons, address bar, menu (toolbar_) | | | 630 // | | Navigation buttons, address bar, menu (toolbar_) | | |
624 // | -------------------------------------------------------------- | | 631 // | -------------------------------------------------------------- | |
625 // |------------------------------------------------------------------| | 632 // |------------------------------------------------------------------| |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 gfx::ScopedSysColorChangeListener color_change_listener_; | 782 gfx::ScopedSysColorChangeListener color_change_listener_; |
776 | 783 |
777 scoped_ptr<InstantOverlayControllerViews> overlay_controller_; | 784 scoped_ptr<InstantOverlayControllerViews> overlay_controller_; |
778 | 785 |
779 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; | 786 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; |
780 | 787 |
781 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 788 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
782 }; | 789 }; |
783 | 790 |
784 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 791 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |