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