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

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: respond to comments 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 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 3470
3471 void Browser::DidNavigateToPendingEntry(TabContents* tab) { 3471 void Browser::DidNavigateToPendingEntry(TabContents* tab) {
3472 if (tab == GetSelectedTabContents()) 3472 if (tab == GetSelectedTabContents())
3473 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); 3473 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
3474 } 3474 }
3475 3475
3476 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { 3476 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() {
3477 return GetJavaScriptDialogCreatorInstance(); 3477 return GetJavaScriptDialogCreatorInstance();
3478 } 3478 }
3479 3479
3480 void Browser::EnterFullscreenMode() {
3481 if (window_->IsFullscreen())
scherkus (not reviewing) 2011/07/28 22:43:08 are these DCHECK worthy or plausible calls?
sky 2011/07/28 22:45:38 Since the user can always enter/exit fullscreen at
koz (OOO until 15th September) 2011/07/29 04:12:58 Right - there's nothing to stop a site calling web
3482 return;
3483 ToggleFullscreenMode();
3484 }
3485
3486 void Browser::ExitFullscreenMode() {
3487 if (!window_->IsFullscreen())
scherkus (not reviewing) 2011/07/28 22:43:08 ditto
koz (OOO until 15th September) 2011/07/29 04:12:58 As above.
3488 return;
3489 ToggleFullscreenMode();
3490 }
3491
3480 /////////////////////////////////////////////////////////////////////////////// 3492 ///////////////////////////////////////////////////////////////////////////////
3481 // Browser, TabContentsWrapperDelegate implementation: 3493 // Browser, TabContentsWrapperDelegate implementation:
3482 3494
3483 void Browser::OnDidGetApplicationInfo(TabContentsWrapper* source, 3495 void Browser::OnDidGetApplicationInfo(TabContentsWrapper* source,
3484 int32 page_id) { 3496 int32 page_id) {
3485 if (GetSelectedTabContentsWrapper() != source) 3497 if (GetSelectedTabContentsWrapper() != source)
3486 return; 3498 return;
3487 3499
3488 NavigationEntry* entry = source->controller().GetLastCommittedEntry(); 3500 NavigationEntry* entry = source->controller().GetLastCommittedEntry();
3489 if (!entry || (entry->page_id() != page_id)) 3501 if (!entry || (entry->page_id() != page_id))
(...skipping 1292 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