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

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

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some issues with shelf visibility and desktop fullscreen. Created 6 years, 9 months 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 | Annotate | Revision Log
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // 116 //
117 // Don't use this unless you only have a NativeWindow. In nearly all 117 // Don't use this unless you only have a NativeWindow. In nearly all
118 // situations plumb through browser and use it. 118 // situations plumb through browser and use it.
119 static BrowserView* GetBrowserViewForNativeWindow(gfx::NativeWindow window); 119 static BrowserView* GetBrowserViewForNativeWindow(gfx::NativeWindow window);
120 120
121 // Returns the BrowserView used for the specified Browser. 121 // Returns the BrowserView used for the specified Browser.
122 static BrowserView* GetBrowserViewForBrowser(const Browser* browser); 122 static BrowserView* GetBrowserViewForBrowser(const Browser* browser);
123 123
124 // Returns a Browser instance of this view. 124 // Returns a Browser instance of this view.
125 Browser* browser() { return browser_.get(); } 125 Browser* browser() { return browser_.get(); }
126 const Browser* browser() const { return browser_.get(); }
126 127
127 // Initializes (or re-initializes) the status bubble. We try to only create 128 // Initializes (or re-initializes) the status bubble. We try to only create
128 // the bubble once and re-use it for the life of the browser, but certain 129 // the bubble once and re-use it for the life of the browser, but certain
129 // events (such as changing enabling/disabling Aero on Win) can force a need 130 // events (such as changing enabling/disabling Aero on Win) can force a need
130 // to change some of the bubble's creation parameters. 131 // to change some of the bubble's creation parameters.
131 void InitStatusBubble(); 132 void InitStatusBubble();
132 133
133 // Initializes the permission bubble view. This class is intended to be 134 // Initializes the permission bubble view. This class is intended to be
134 // created once and then re-used for the life of the browser window. The 135 // created once and then re-used for the life of the browser window. The
135 // bubbles it creates will be associated with a single visible tab. 136 // bubbles it creates will be associated with a single visible tab.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 views::WebView* GetDevToolsWebViewForTest() { return devtools_web_view_; } 472 views::WebView* GetDevToolsWebViewForTest() { return devtools_web_view_; }
472 473
473 private: 474 private:
474 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate 475 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
475 // interface to keep these two classes decoupled and testable. 476 // interface to keep these two classes decoupled and testable.
476 friend class BrowserViewLayoutDelegateImpl; 477 friend class BrowserViewLayoutDelegateImpl;
477 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView); 478 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
478 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, 479 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest,
479 TestAboutChromeViewAccObj); 480 TestAboutChromeViewAccObj);
480 481
481 enum FullscreenType { 482 enum FullscreenMode {
482 FOR_DESKTOP, 483 NORMAL_FULLSCREEN,
sky 2014/03/13 22:08:25 nit: follow naming pattern we used for content (ht
483 FOR_METRO 484 METRO_SNAP_FULLSCREEN
484 }; 485 };
485 486
486 // Appends to |toolbars| a pointer to each AccessiblePaneView that 487 // Appends to |toolbars| a pointer to each AccessiblePaneView that
487 // can be traversed using F6, in the order they should be traversed. 488 // can be traversed using F6, in the order they should be traversed.
488 void GetAccessiblePanes(std::vector<views::AccessiblePaneView*>* panes); 489 void GetAccessiblePanes(std::vector<views::AccessiblePaneView*>* panes);
489 490
490 // Constructs and initializes the child views. 491 // Constructs and initializes the child views.
491 void InitViews(); 492 void InitViews();
492 493
493 // Callback for the loading animation(s) associated with this view. 494 // Callback for the loading animation(s) associated with this view.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // Invoked to update the necessary things when our fullscreen state changes 539 // Invoked to update the necessary things when our fullscreen state changes
539 // to |fullscreen|. On Windows this is invoked immediately when we toggle the 540 // to |fullscreen|. On Windows this is invoked immediately when we toggle the
540 // full screen state. On Linux changing the fullscreen state is async, so we 541 // full screen state. On Linux changing the fullscreen state is async, so we
541 // ask the window to change its fullscreen state, then when we get 542 // ask the window to change its fullscreen state, then when we get
542 // notification that it succeeded this method is invoked. 543 // notification that it succeeded this method is invoked.
543 // If |url| is not empty, it is the URL of the page that requested fullscreen 544 // If |url| is not empty, it is the URL of the page that requested fullscreen
544 // (via the fullscreen JS API). 545 // (via the fullscreen JS API).
545 // |bubble_type| determines what should be shown in the fullscreen exit 546 // |bubble_type| determines what should be shown in the fullscreen exit
546 // bubble. 547 // bubble.
547 void ProcessFullscreen(bool fullscreen, 548 void ProcessFullscreen(bool fullscreen,
548 FullscreenType fullscreen_type, 549 FullscreenMode mode,
549 const GURL& url, 550 const GURL& url,
550 FullscreenExitBubbleType bubble_type); 551 FullscreenExitBubbleType bubble_type);
551 552
552 // Returns whether immmersive fullscreen should replace fullscreen. This 553 // Returns whether immmersive fullscreen should replace fullscreen. This
553 // should only occur for "browser-fullscreen" for tabbed-typed windows (not 554 // should only occur for "browser-fullscreen" for tabbed-typed windows (not
554 // for tab-fullscreen and not for app/popup type windows). 555 // for tab-fullscreen and not for app/popup type windows).
555 bool ShouldUseImmersiveFullscreenForUrl(const GURL& url) const; 556 bool ShouldUseImmersiveFullscreenForUrl(const GURL& url) const;
556 557
557 // Copy the accelerator table from the app resources into something we can 558 // Copy the accelerator table from the app resources into something we can
558 // use. 559 // use.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 scoped_ptr<ScrollEndEffectController> scroll_end_effect_controller_; 737 scoped_ptr<ScrollEndEffectController> scroll_end_effect_controller_;
737 738
738 gfx::ScopedSysColorChangeListener color_change_listener_; 739 gfx::ScopedSysColorChangeListener color_change_listener_;
739 740
740 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; 741 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_;
741 742
742 DISALLOW_COPY_AND_ASSIGN(BrowserView); 743 DISALLOW_COPY_AND_ASSIGN(BrowserView);
743 }; 744 };
744 745
745 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 746 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698