| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 virtual void Maximize() OVERRIDE; | 247 virtual void Maximize() OVERRIDE; |
| 248 virtual void Minimize() OVERRIDE; | 248 virtual void Minimize() OVERRIDE; |
| 249 virtual void Restore() OVERRIDE; | 249 virtual void Restore() OVERRIDE; |
| 250 virtual void EnterFullscreen( | 250 virtual void EnterFullscreen( |
| 251 const GURL& url, FullscreenExitBubbleType bubble_type) OVERRIDE; | 251 const GURL& url, FullscreenExitBubbleType bubble_type) OVERRIDE; |
| 252 virtual void ExitFullscreen() OVERRIDE; | 252 virtual void ExitFullscreen() OVERRIDE; |
| 253 virtual void UpdateFullscreenExitBubbleContent( | 253 virtual void UpdateFullscreenExitBubbleContent( |
| 254 const GURL& url, | 254 const GURL& url, |
| 255 FullscreenExitBubbleType bubble_type) OVERRIDE; | 255 FullscreenExitBubbleType bubble_type) OVERRIDE; |
| 256 virtual bool IsFullscreen() const OVERRIDE; | 256 virtual bool IsFullscreen() const OVERRIDE; |
| 257 #if defined(OS_WIN) | |
| 258 virtual void SetMetroSnapMode(bool enable) OVERRIDE; | |
| 259 virtual bool IsInMetroSnapMode() const OVERRIDE; | |
| 260 #endif | |
| 261 virtual LocationBar* GetLocationBar() const OVERRIDE; | 257 virtual LocationBar* GetLocationBar() const OVERRIDE; |
| 262 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; | 258 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; |
| 263 virtual void UpdateReloadStopState(bool is_loading, bool force) OVERRIDE; | 259 virtual void UpdateReloadStopState(bool is_loading, bool force) OVERRIDE; |
| 264 virtual void UpdateToolbar(TabContents* contents, | 260 virtual void UpdateToolbar(TabContents* contents, |
| 265 bool should_restore_state) OVERRIDE; | 261 bool should_restore_state) OVERRIDE; |
| 266 virtual void FocusToolbar() OVERRIDE; | 262 virtual void FocusToolbar() OVERRIDE; |
| 267 virtual void FocusAppMenu() OVERRIDE; | 263 virtual void FocusAppMenu() OVERRIDE; |
| 268 virtual void FocusBookmarksToolbar() OVERRIDE; | 264 virtual void FocusBookmarksToolbar() OVERRIDE; |
| 269 virtual void RotatePaneFocus(bool forwards) OVERRIDE; | 265 virtual void RotatePaneFocus(bool forwards) OVERRIDE; |
| 270 virtual void DestroyBrowser() OVERRIDE; | 266 virtual void DestroyBrowser() OVERRIDE; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 virtual void Init(); | 436 virtual void Init(); |
| 441 | 437 |
| 442 // Callback for the loading animation(s) associated with this view. | 438 // Callback for the loading animation(s) associated with this view. |
| 443 virtual void LoadingAnimationCallback(); | 439 virtual void LoadingAnimationCallback(); |
| 444 | 440 |
| 445 private: | 441 private: |
| 446 friend class BrowserViewLayout; | 442 friend class BrowserViewLayout; |
| 447 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, | 443 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, |
| 448 TestAboutChromeViewAccObj); | 444 TestAboutChromeViewAccObj); |
| 449 | 445 |
| 450 enum FullscreenType { | |
| 451 FOR_DESKTOP, | |
| 452 FOR_METRO | |
| 453 }; | |
| 454 | |
| 455 // We store this on linux because we must call ProcessFullscreen() | 446 // We store this on linux because we must call ProcessFullscreen() |
| 456 // asynchronously from FullScreenStateChanged() instead of directly from | 447 // asynchronously from FullScreenStateChanged() instead of directly from |
| 457 // EnterFullscreen(). | 448 // EnterFullscreen(). |
| 458 struct PendingFullscreenRequest { | 449 struct PendingFullscreenRequest { |
| 459 PendingFullscreenRequest() | 450 PendingFullscreenRequest() |
| 460 : pending(false), | 451 : pending(false), |
| 461 bubble_type(FEB_TYPE_NONE) {} | 452 bubble_type(FEB_TYPE_NONE) {} |
| 462 | 453 |
| 463 bool pending; | 454 bool pending; |
| 464 GURL url; | 455 GURL url; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 // Invoked to update the necessary things when our fullscreen state changes | 499 // Invoked to update the necessary things when our fullscreen state changes |
| 509 // to |fullscreen|. On Windows this is invoked immediately when we toggle the | 500 // to |fullscreen|. On Windows this is invoked immediately when we toggle the |
| 510 // full screen state. On Linux changing the fullscreen state is async, so we | 501 // full screen state. On Linux changing the fullscreen state is async, so we |
| 511 // ask the window to change its fullscreen state, then when we get | 502 // ask the window to change its fullscreen state, then when we get |
| 512 // notification that it succeeded this method is invoked. | 503 // notification that it succeeded this method is invoked. |
| 513 // If |url| is not empty, it is the URL of the page that requested fullscreen | 504 // If |url| is not empty, it is the URL of the page that requested fullscreen |
| 514 // (via the fullscreen JS API). | 505 // (via the fullscreen JS API). |
| 515 // |bubble_type| determines what should be shown in the fullscreen exit | 506 // |bubble_type| determines what should be shown in the fullscreen exit |
| 516 // bubble. | 507 // bubble. |
| 517 void ProcessFullscreen(bool fullscreen, | 508 void ProcessFullscreen(bool fullscreen, |
| 518 FullscreenType fullscreen_type, | |
| 519 const GURL& url, | 509 const GURL& url, |
| 520 FullscreenExitBubbleType bubble_type); | 510 FullscreenExitBubbleType bubble_type); |
| 521 | 511 |
| 522 // Copy the accelerator table from the app resources into something we can | 512 // Copy the accelerator table from the app resources into something we can |
| 523 // use. | 513 // use. |
| 524 void LoadAccelerators(); | 514 void LoadAccelerators(); |
| 525 | 515 |
| 526 // Retrieves the command id for the specified Windows app command. | 516 // Retrieves the command id for the specified Windows app command. |
| 527 int GetCommandIDForAppCommandID(int app_command_id) const; | 517 int GetCommandIDForAppCommandID(int app_command_id) const; |
| 528 | 518 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 bool force_location_bar_focus_; | 687 bool force_location_bar_focus_; |
| 698 | 688 |
| 699 PendingFullscreenRequest fullscreen_request_; | 689 PendingFullscreenRequest fullscreen_request_; |
| 700 | 690 |
| 701 gfx::ScopedSysColorChangeListener color_change_listener_; | 691 gfx::ScopedSysColorChangeListener color_change_listener_; |
| 702 | 692 |
| 703 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 693 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
| 704 }; | 694 }; |
| 705 | 695 |
| 706 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 696 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |