OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 // NOTE: For more information about the objects and files in this directory, | 37 // NOTE: For more information about the objects and files in this directory, |
38 // view: http://dev.chromium.org/developers/design-documents/browser-window | 38 // view: http://dev.chromium.org/developers/design-documents/browser-window |
39 | 39 |
40 class AccessibleToolbarView; | 40 class AccessibleToolbarView; |
41 class AccessibleViewHelper; | 41 class AccessibleViewHelper; |
42 class BookmarkBarView; | 42 class BookmarkBarView; |
43 class Browser; | 43 class Browser; |
44 class BrowserBubble; | 44 class BrowserBubble; |
45 class BrowserViewLayout; | 45 class BrowserViewLayout; |
| 46 class ContentsContainer; |
46 class DownloadShelfView; | 47 class DownloadShelfView; |
47 class EncodingMenuModel; | 48 class EncodingMenuModel; |
48 class FullscreenExitBubble; | 49 class FullscreenExitBubble; |
49 class HtmlDialogUIDelegate; | 50 class HtmlDialogUIDelegate; |
50 class InfoBarContainer; | 51 class InfoBarContainer; |
51 class LocationBarView; | 52 class LocationBarView; |
52 class SideTabStrip; | 53 class SideTabStrip; |
53 class StatusBubbleViews; | 54 class StatusBubbleViews; |
54 class TabContentsContainer; | 55 class TabContentsContainer; |
55 class ToolbarView; | 56 class ToolbarView; |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 bool show_history); | 313 bool show_history); |
313 virtual void ShowAppMenu(); | 314 virtual void ShowAppMenu(); |
314 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 315 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
315 bool* is_keyboard_shortcut); | 316 bool* is_keyboard_shortcut); |
316 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 317 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
317 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); | 318 virtual void ShowCreateShortcutsDialog(TabContents* tab_contents); |
318 virtual void Cut(); | 319 virtual void Cut(); |
319 virtual void Copy(); | 320 virtual void Copy(); |
320 virtual void Paste(); | 321 virtual void Paste(); |
321 virtual void ToggleTabStripMode(); | 322 virtual void ToggleTabStripMode(); |
| 323 virtual void ShowMatchPreview(); |
| 324 virtual void HideMatchPreview(); |
322 | 325 |
323 // Overridden from BrowserWindowTesting: | 326 // Overridden from BrowserWindowTesting: |
324 virtual BookmarkBarView* GetBookmarkBarView() const; | 327 virtual BookmarkBarView* GetBookmarkBarView() const; |
325 virtual LocationBarView* GetLocationBarView() const; | 328 virtual LocationBarView* GetLocationBarView() const; |
326 virtual views::View* GetTabContentsContainerView() const; | 329 virtual views::View* GetTabContentsContainerView() const; |
327 virtual views::View* GetSidebarContainerView() const; | 330 virtual views::View* GetSidebarContainerView() const; |
328 virtual ToolbarView* GetToolbarView() const; | 331 virtual ToolbarView* GetToolbarView() const; |
329 | 332 |
330 // Overridden from NotificationObserver: | 333 // Overridden from NotificationObserver: |
331 virtual void Observe(NotificationType type, | 334 virtual void Observe(NotificationType type, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 // multiple times over the life of the browser, and is run when the display | 416 // multiple times over the life of the browser, and is run when the display |
414 // mode for the tabstrip changes from horizontal to vertical. | 417 // mode for the tabstrip changes from horizontal to vertical. |
415 virtual void InitTabStrip(TabStripModel* tab_strip_model); | 418 virtual void InitTabStrip(TabStripModel* tab_strip_model); |
416 | 419 |
417 // Browser window related initializations. | 420 // Browser window related initializations. |
418 virtual void Init(); | 421 virtual void Init(); |
419 | 422 |
420 private: | 423 private: |
421 friend class BrowserViewLayout; | 424 friend class BrowserViewLayout; |
422 | 425 |
423 class ContentsContainer; | |
424 | |
425 #if defined(OS_WIN) | 426 #if defined(OS_WIN) |
426 // Creates the system menu. | 427 // Creates the system menu. |
427 void InitSystemMenu(); | 428 void InitSystemMenu(); |
428 #endif | 429 #endif |
429 | 430 |
430 // Returns the BrowserViewLayout. | 431 // Returns the BrowserViewLayout. |
431 BrowserViewLayout* GetBrowserViewLayout() const; | 432 BrowserViewLayout* GetBrowserViewLayout() const; |
432 | 433 |
433 // Layout the Status Bubble. | 434 // Layout the Status Bubble. |
434 void LayoutStatusBubble(int top); | 435 void LayoutStatusBubble(int top); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 487 |
487 // Retrieves the command id for the specified Windows app command. | 488 // Retrieves the command id for the specified Windows app command. |
488 int GetCommandIDForAppCommandID(int app_command_id) const; | 489 int GetCommandIDForAppCommandID(int app_command_id) const; |
489 | 490 |
490 // Callback for the loading animation(s) associated with this view. | 491 // Callback for the loading animation(s) associated with this view. |
491 void LoadingAnimationCallback(); | 492 void LoadingAnimationCallback(); |
492 | 493 |
493 // Initialize the hung plugin detector. | 494 // Initialize the hung plugin detector. |
494 void InitHangMonitor(); | 495 void InitHangMonitor(); |
495 | 496 |
496 // Shows the match preview for the selected tab contents. | |
497 void ShowMatchPreview(); | |
498 | |
499 // Hides the match preview for the selected tab contents. | |
500 void HideMatchPreview(); | |
501 | |
502 // Invoked from TabSelectedAt or when the match preview is made active. Is | 497 // Invoked from TabSelectedAt or when the match preview is made active. Is |
503 // |change_tab_contents| is true, |new_contents| is added to the view | 498 // |change_tab_contents| is true, |new_contents| is added to the view |
504 // hierarchy, if |change_tab_contents| is false, it's assumed |new_contents| | 499 // hierarchy, if |change_tab_contents| is false, it's assumed |new_contents| |
505 // has already been added to the view hierarchy. | 500 // has already been added to the view hierarchy. |
506 void ProcessTabSelected(TabContents* new_contents, bool change_tab_contents); | 501 void ProcessTabSelected(TabContents* new_contents, bool change_tab_contents); |
507 | 502 |
508 // Last focused view that issued a tab traversal. | 503 // Last focused view that issued a tab traversal. |
509 int last_focused_view_storage_id_; | 504 int last_focused_view_storage_id_; |
510 | 505 |
511 // The BrowserFrame that hosts this view. | 506 // The BrowserFrame that hosts this view. |
512 BrowserFrame* frame_; | 507 BrowserFrame* frame_; |
513 | 508 |
514 // The Browser object we are associated with. | 509 // The Browser object we are associated with. |
515 scoped_ptr<Browser> browser_; | 510 scoped_ptr<Browser> browser_; |
516 | 511 |
517 // BrowserView layout (LTR one is pictured here). | 512 // BrowserView layout (LTR one is pictured here). |
518 // | 513 // |
519 // -------------------------------------------------------------------------- | 514 // -------------------------------------------------------------------------- |
520 // | | Tabs (1) | | 515 // | | Tabs (1) | |
521 // | |--------------------------------------------------------------| | 516 // | |--------------------------------------------------------------| |
522 // | | Navigation buttons, menus and the address bar (toolbar_) | | 517 // | | Navigation buttons, menus and the address bar (toolbar_) | |
523 // | |--------------------------------------------------------------| | 518 // | |--------------------------------------------------------------| |
524 // | | All infobars (infobar_container_) | | 519 // | | All infobars (infobar_container_) * | |
525 // | |--------------------------------------------------------------| | 520 // | |--------------------------------------------------------------| |
526 // | | Bookmarks (bookmark_bar_view_) | | 521 // | | Bookmarks (bookmark_bar_view_) * | |
527 // | |--------------------------------------------------------------| | 522 // | |--------------------------------------------------------------| |
528 // | |Page content (contents_) || | | 523 // | |Page content (contents_) || | |
529 // | |--------------------------------------|| Sidebar content | | 524 // | |--------------------------------------|| Sidebar content | |
530 // | || contents_container_ or ||| (sidebar_container_) | | 525 // | || contents_container_ and/or ||| (sidebar_container_) | |
531 // | || preview_container_ ||| | | 526 // | || preview_container_ ||| | |
532 // | || |(3) | | 527 // | || |(3) | |
533 // | Tabs (2)|| ||| | | 528 // | Tabs (2)|| ||| | |
534 // | || ||| | | 529 // | || ||| | |
535 // | || ||| | | 530 // | || ||| | |
536 // | || ||| | | 531 // | || ||| | |
537 // | |--------------------------------------|| | | 532 // | |--------------------------------------|| | |
538 // | |==(4)=========================================================| | 533 // | |==(4)=========================================================| |
539 // | | | | 534 // | | | |
540 // | | | | 535 // | | | |
541 // | | Debugger (devtools_container_) | | 536 // | | Debugger (devtools_container_) | |
542 // | | | | 537 // | | | |
543 // | | | | 538 // | | | |
544 // | |--------------------------------------------------------------| | 539 // | |--------------------------------------------------------------| |
545 // | | Active downloads (download_shelf_) | | 540 // | | Active downloads (download_shelf_) | |
546 // -------------------------------------------------------------------------- | 541 // -------------------------------------------------------------------------- |
547 // | 542 // |
548 // (1) - tabstrip_, default position | 543 // (1) - tabstrip_, default position |
549 // (2) - tabstrip_, position when side tabs are enabled | 544 // (2) - tabstrip_, position when side tabs are enabled |
550 // (3) - sidebar_split_ | 545 // (3) - sidebar_split_ |
551 // (4) - contents_split_ | 546 // (4) - contents_split_ |
| 547 // |
| 548 // * - The bookmark bar and info bar are swapped when on the new tab page. |
| 549 // Additionally contents_ is positioned on top of the bookmark bar when |
| 550 // the bookmark bar is detached. This is done to allow the |
| 551 // preview_container_ to appear over the bookmark bar. |
552 | 552 |
553 // Tool/Info bars that we are currently showing. Used for layout. | 553 // Tool/Info bars that we are currently showing. Used for layout. |
554 // active_bookmark_bar_ is either NULL, if the bookmark bar isn't showing, | 554 // active_bookmark_bar_ is either NULL, if the bookmark bar isn't showing, |
555 // or is bookmark_bar_view_ if the bookmark bar is showing. | 555 // or is bookmark_bar_view_ if the bookmark bar is showing. |
556 views::View* active_bookmark_bar_; | 556 views::View* active_bookmark_bar_; |
557 | 557 |
558 // The TabStrip. | 558 // The TabStrip. |
559 BaseTabStrip* tabstrip_; | 559 BaseTabStrip* tabstrip_; |
560 | 560 |
561 // The Toolbar containing the navigation buttons, menus and the address bar. | 561 // The Toolbar containing the navigation buttons, menus and the address bar. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 645 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
646 | 646 |
647 scoped_ptr<AccessibleViewHelper> accessible_view_helper_; | 647 scoped_ptr<AccessibleViewHelper> accessible_view_helper_; |
648 | 648 |
649 NotificationRegistrar registrar_; | 649 NotificationRegistrar registrar_; |
650 | 650 |
651 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 651 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
652 }; | 652 }; |
653 | 653 |
654 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 654 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |