| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // Overridden from BrowserWindowTesting: | 347 // Overridden from BrowserWindowTesting: |
| 348 virtual BookmarkBarView* GetBookmarkBarView() const OVERRIDE; | 348 virtual BookmarkBarView* GetBookmarkBarView() const OVERRIDE; |
| 349 virtual LocationBarView* GetLocationBarView() const OVERRIDE; | 349 virtual LocationBarView* GetLocationBarView() const OVERRIDE; |
| 350 virtual views::View* GetTabContentsContainerView() const OVERRIDE; | 350 virtual views::View* GetTabContentsContainerView() const OVERRIDE; |
| 351 virtual ToolbarView* GetToolbarView() const OVERRIDE; | 351 virtual ToolbarView* GetToolbarView() const OVERRIDE; |
| 352 | 352 |
| 353 // Overridden from TabStripModelObserver: | 353 // Overridden from TabStripModelObserver: |
| 354 virtual void TabDetachedAt(content::WebContents* contents, | 354 virtual void TabDetachedAt(content::WebContents* contents, |
| 355 int index) OVERRIDE; | 355 int index) OVERRIDE; |
| 356 virtual void TabDeactivated(content::WebContents* contents) OVERRIDE; | 356 virtual void TabDeactivated(content::WebContents* contents) OVERRIDE; |
| 357 virtual void ActiveTabChanged(TabContents* old_contents, | 357 virtual void ActiveTabChanged(content::WebContents* old_contents, |
| 358 TabContents* new_contents, | 358 content::WebContents* new_contents, |
| 359 int index, | 359 int index, |
| 360 bool user_gesture) OVERRIDE; | 360 bool user_gesture) OVERRIDE; |
| 361 virtual void TabStripEmpty() OVERRIDE; | 361 virtual void TabStripEmpty() OVERRIDE; |
| 362 | 362 |
| 363 // Overridden from ui::AcceleratorProvider: | 363 // Overridden from ui::AcceleratorProvider: |
| 364 virtual bool GetAcceleratorForCommandId(int command_id, | 364 virtual bool GetAcceleratorForCommandId(int command_id, |
| 365 ui::Accelerator* accelerator) OVERRIDE; | 365 ui::Accelerator* accelerator) OVERRIDE; |
| 366 | 366 |
| 367 // Overridden from views::WidgetDelegate: | 367 // Overridden from views::WidgetDelegate: |
| 368 virtual bool CanResize() const OVERRIDE; | 368 virtual bool CanResize() const OVERRIDE; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 GURL url; | 467 GURL url; |
| 468 FullscreenExitBubbleType bubble_type; | 468 FullscreenExitBubbleType bubble_type; |
| 469 }; | 469 }; |
| 470 | 470 |
| 471 // Returns the BrowserViewLayout. | 471 // Returns the BrowserViewLayout. |
| 472 BrowserViewLayout* GetBrowserViewLayout() const; | 472 BrowserViewLayout* GetBrowserViewLayout() const; |
| 473 | 473 |
| 474 // Layout the Status Bubble. | 474 // Layout the Status Bubble. |
| 475 void LayoutStatusBubble(); | 475 void LayoutStatusBubble(); |
| 476 | 476 |
| 477 // Prepare to show the Bookmark Bar for the specified TabContents. | 477 // Prepare to show the Bookmark Bar for the specified WebContents. |
| 478 // Returns true if the Bookmark Bar can be shown (i.e. it's supported for this | 478 // Returns true if the Bookmark Bar can be shown (i.e. it's supported for this |
| 479 // Browser type) and there should be a subsequent re-layout to show it. | 479 // Browser type) and there should be a subsequent re-layout to show it. |
| 480 // |contents| can be NULL. | 480 // |contents| can be NULL. |
| 481 bool MaybeShowBookmarkBar(TabContents* contents); | 481 bool MaybeShowBookmarkBar(content::WebContents* contents); |
| 482 | 482 |
| 483 // Prepare to show an Info Bar for the specified TabContents. Returns | 483 // Prepare to show an Info Bar for the specified WebContents. Returns |
| 484 // true if there is an Info Bar to show and one is supported for this Browser | 484 // true if there is an Info Bar to show and one is supported for this Browser |
| 485 // type, and there should be a subsequent re-layout to show it. | 485 // type, and there should be a subsequent re-layout to show it. |
| 486 // |contents| can be NULL. | 486 // |contents| can be NULL. |
| 487 bool MaybeShowInfoBar(TabContents* contents); | 487 bool MaybeShowInfoBar(content::WebContents* contents); |
| 488 | 488 |
| 489 // Updates devtools window for given contents. This method will show docked | 489 // Updates devtools window for given contents. This method will show docked |
| 490 // devtools window for inspected |tab_contents| that has docked devtools | 490 // devtools window for inspected |web_contents| that has docked devtools |
| 491 // and hide it for NULL or not inspected |tab_contents|. It will also make | 491 // and hide it for NULL or not inspected |web_contents|. It will also make |
| 492 // sure devtools window size and position are restored for given tab. | 492 // sure devtools window size and position are restored for given tab. |
| 493 void UpdateDevToolsForContents(TabContents* tab_contents); | 493 void UpdateDevToolsForContents(content::WebContents* web_contents); |
| 494 | 494 |
| 495 // Shows docked devtools. | 495 // Shows docked devtools. |
| 496 void ShowDevToolsContainer(); | 496 void ShowDevToolsContainer(); |
| 497 | 497 |
| 498 // Hides docked devtools. | 498 // Hides docked devtools. |
| 499 void HideDevToolsContainer(); | 499 void HideDevToolsContainer(); |
| 500 | 500 |
| 501 // Reads split position from the current tab's devtools window and applies | 501 // Reads split position from the current tab's devtools window and applies |
| 502 // it to the devtools split. | 502 // it to the devtools split. |
| 503 void UpdateDevToolsSplitPosition(); | 503 void UpdateDevToolsSplitPosition(); |
| 504 | 504 |
| 505 // Updates various optional child Views, e.g. Bookmarks Bar, Info Bar or the | 505 // Updates various optional child Views, e.g. Bookmarks Bar, Info Bar or the |
| 506 // Download Shelf in response to a change notification from the specified | 506 // Download Shelf in response to a change notification from the specified |
| 507 // |contents|. |contents| can be NULL. In this case, all optional UI will be | 507 // |contents|. |contents| can be NULL. In this case, all optional UI will be |
| 508 // removed. | 508 // removed. |
| 509 void UpdateUIForContents(TabContents* contents); | 509 void UpdateUIForContents(content::WebContents* contents); |
| 510 | 510 |
| 511 // Updates an optional child View, e.g. Bookmarks Bar, Info Bar, Download | 511 // Updates an optional child View, e.g. Bookmarks Bar, Info Bar, Download |
| 512 // Shelf. If |*old_view| differs from new_view, the old_view is removed and | 512 // Shelf. If |*old_view| differs from new_view, the old_view is removed and |
| 513 // the new_view is added. This is intended to be used when swapping in/out | 513 // the new_view is added. This is intended to be used when swapping in/out |
| 514 // child views that are referenced via a field. | 514 // child views that are referenced via a field. |
| 515 // Returns true if anything was changed, and a re-Layout is now required. | 515 // Returns true if anything was changed, and a re-Layout is now required. |
| 516 bool UpdateChildViewAndLayout(views::View* new_view, views::View** old_view); | 516 bool UpdateChildViewAndLayout(views::View* new_view, views::View** old_view); |
| 517 | 517 |
| 518 // Invoked to update the necessary things when our fullscreen state changes | 518 // Invoked to update the necessary things when our fullscreen state changes |
| 519 // to |fullscreen|. On Windows this is invoked immediately when we toggle the | 519 // to |fullscreen|. On Windows this is invoked immediately when we toggle the |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 gfx::ScopedSysColorChangeListener color_change_listener_; | 715 gfx::ScopedSysColorChangeListener color_change_listener_; |
| 716 | 716 |
| 717 scoped_ptr<InstantPreviewControllerViews> preview_controller_; | 717 scoped_ptr<InstantPreviewControllerViews> preview_controller_; |
| 718 | 718 |
| 719 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; | 719 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; |
| 720 | 720 |
| 721 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 721 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
| 722 }; | 722 }; |
| 723 | 723 |
| 724 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 724 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |