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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 7461059: Fullscreen JS API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responded to sky's comment Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 // BrowserWindow::SetFullscreen() asks for bookmark_bar_state_, so we let the 1614 // BrowserWindow::SetFullscreen() asks for bookmark_bar_state_, so we let the
1615 // BrowserWindow invoke WindowFullscreenStateChanged when appropriate. 1615 // BrowserWindow invoke WindowFullscreenStateChanged when appropriate.
1616 1616
1617 // TODO: convert mac to invoke WindowFullscreenStateChanged once it updates 1617 // TODO: convert mac to invoke WindowFullscreenStateChanged once it updates
1618 // the necessary state of the frame. 1618 // the necessary state of the frame.
1619 #if defined(OS_MACOSX) 1619 #if defined(OS_MACOSX)
1620 WindowFullscreenStateChanged(); 1620 WindowFullscreenStateChanged();
1621 #endif 1621 #endif
1622 } 1622 }
1623 1623
1624 void Browser::EnterFullscreenMode() {
1625 if (window_->IsFullscreen())
1626 return;
1627 ToggleFullscreenMode();
1628 }
1629
1630 void Browser::ExitFullscreenMode() {
1631 if (!window_->IsFullscreen())
1632 return;
1633 ToggleFullscreenMode();
1634 }
1635
1624 #if defined(OS_CHROMEOS) 1636 #if defined(OS_CHROMEOS)
1625 void Browser::Search() { 1637 void Browser::Search() {
1626 // If the NTP is showing, close it. 1638 // If the NTP is showing, close it.
1627 const GURL& url = GetSelectedTabContents()->GetURL(); 1639 const GURL& url = GetSelectedTabContents()->GetURL();
1628 if (url.SchemeIs(chrome::kChromeUIScheme) && 1640 if (url.SchemeIs(chrome::kChromeUIScheme) &&
1629 url.host() == chrome::kChromeUINewTabHost) { 1641 url.host() == chrome::kChromeUINewTabHost) {
1630 CloseTab(); 1642 CloseTab();
1631 return; 1643 return;
1632 } 1644 }
1633 1645
(...skipping 3148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4782 window_->BookmarkBarStateChanged(animate_type); 4794 window_->BookmarkBarStateChanged(animate_type);
4783 } 4795 }
4784 4796
4785 void Browser::ShowSyncSetup() { 4797 void Browser::ShowSyncSetup() {
4786 ProfileSyncService* service = profile()->GetProfileSyncService(); 4798 ProfileSyncService* service = profile()->GetProfileSyncService();
4787 if (service->HasSyncSetupCompleted()) 4799 if (service->HasSyncSetupCompleted())
4788 ShowOptionsTab(chrome::kSyncSetupSubPage); 4800 ShowOptionsTab(chrome::kSyncSetupSubPage);
4789 else 4801 else
4790 profile()->GetProfileSyncService()->ShowLoginDialog(); 4802 profile()->GetProfileSyncService()->ShowLoginDialog();
4791 } 4803 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698