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

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

Issue 10446106: Preliminary metro snap plumbing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix test errors, unify fullscreen code in browser view. Created 8 years, 6 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
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 #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
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 ToggleMetroSnapMode(bool enable) OVERRIDE;
259 #endif
257 virtual LocationBar* GetLocationBar() const OVERRIDE; 260 virtual LocationBar* GetLocationBar() const OVERRIDE;
258 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; 261 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE;
259 virtual void UpdateReloadStopState(bool is_loading, bool force) OVERRIDE; 262 virtual void UpdateReloadStopState(bool is_loading, bool force) OVERRIDE;
260 virtual void UpdateToolbar(TabContentsWrapper* contents, 263 virtual void UpdateToolbar(TabContentsWrapper* contents,
261 bool should_restore_state) OVERRIDE; 264 bool should_restore_state) OVERRIDE;
262 virtual void FocusToolbar() OVERRIDE; 265 virtual void FocusToolbar() OVERRIDE;
263 virtual void FocusAppMenu() OVERRIDE; 266 virtual void FocusAppMenu() OVERRIDE;
264 virtual void FocusBookmarksToolbar() OVERRIDE; 267 virtual void FocusBookmarksToolbar() OVERRIDE;
265 virtual void RotatePaneFocus(bool forwards) OVERRIDE; 268 virtual void RotatePaneFocus(bool forwards) OVERRIDE;
266 virtual void DestroyBrowser() OVERRIDE; 269 virtual void DestroyBrowser() OVERRIDE;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 virtual void Init(); 435 virtual void Init();
433 436
434 // Callback for the loading animation(s) associated with this view. 437 // Callback for the loading animation(s) associated with this view.
435 virtual void LoadingAnimationCallback(); 438 virtual void LoadingAnimationCallback();
436 439
437 private: 440 private:
438 friend class BrowserViewLayout; 441 friend class BrowserViewLayout;
439 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, 442 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest,
440 TestAboutChromeViewAccObj); 443 TestAboutChromeViewAccObj);
441 444
445 enum ProcessFullscreenType {
sky 2012/06/11 17:04:31 How about just FullscreenType
robertshield 2012/06/11 21:06:57 Done.
446 FOR_DESKTOP,
447 FOR_METRO
448 };
449
442 // We store this on linux because we must call ProcessFullscreen() 450 // We store this on linux because we must call ProcessFullscreen()
443 // asynchronously from FullScreenStateChanged() instead of directly from 451 // asynchronously from FullScreenStateChanged() instead of directly from
444 // EnterFullscreen(). 452 // EnterFullscreen().
445 struct PendingFullscreenRequest { 453 struct PendingFullscreenRequest {
446 PendingFullscreenRequest() 454 PendingFullscreenRequest()
447 : pending(false), 455 : pending(false),
448 bubble_type(FEB_TYPE_NONE) {} 456 bubble_type(FEB_TYPE_NONE) {}
449 457
450 bool pending; 458 bool pending;
451 GURL url; 459 GURL url;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // Invoked to update the necessary things when our fullscreen state changes 503 // Invoked to update the necessary things when our fullscreen state changes
496 // to |fullscreen|. On Windows this is invoked immediately when we toggle the 504 // to |fullscreen|. On Windows this is invoked immediately when we toggle the
497 // full screen state. On Linux changing the fullscreen state is async, so we 505 // full screen state. On Linux changing the fullscreen state is async, so we
498 // ask the window to change its fullscreen state, then when we get 506 // ask the window to change its fullscreen state, then when we get
499 // notification that it succeeded this method is invoked. 507 // notification that it succeeded this method is invoked.
500 // If |url| is not empty, it is the URL of the page that requested fullscreen 508 // If |url| is not empty, it is the URL of the page that requested fullscreen
501 // (via the fullscreen JS API). 509 // (via the fullscreen JS API).
502 // |bubble_type| determines what should be shown in the fullscreen exit 510 // |bubble_type| determines what should be shown in the fullscreen exit
503 // bubble. 511 // bubble.
504 void ProcessFullscreen(bool fullscreen, 512 void ProcessFullscreen(bool fullscreen,
513 ProcessFullscreenType fullscreen_type,
505 const GURL& url, 514 const GURL& url,
506 FullscreenExitBubbleType bubble_type); 515 FullscreenExitBubbleType bubble_type);
507 516
508 // Copy the accelerator table from the app resources into something we can 517 // Copy the accelerator table from the app resources into something we can
509 // use. 518 // use.
510 void LoadAccelerators(); 519 void LoadAccelerators();
511 520
512 // Retrieves the command id for the specified Windows app command. 521 // Retrieves the command id for the specified Windows app command.
513 int GetCommandIDForAppCommandID(int app_command_id) const; 522 int GetCommandIDForAppCommandID(int app_command_id) const;
514 523
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 bool force_location_bar_focus_; 692 bool force_location_bar_focus_;
684 693
685 PendingFullscreenRequest fullscreen_request_; 694 PendingFullscreenRequest fullscreen_request_;
686 695
687 gfx::ScopedSysColorChangeListener color_change_listener_; 696 gfx::ScopedSysColorChangeListener color_change_listener_;
688 697
689 DISALLOW_COPY_AND_ASSIGN(BrowserView); 698 DISALLOW_COPY_AND_ASSIGN(BrowserView);
690 }; 699 };
691 700
692 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 701 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698