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

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

Issue 10700071: browser: Remove fullscreen functions and have callers call FullscreenController directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 void Browser::WindowFullscreenStateChanged() { 741 void Browser::WindowFullscreenStateChanged() {
742 fullscreen_controller_->WindowFullscreenStateChanged(); 742 fullscreen_controller_->WindowFullscreenStateChanged();
743 command_controller_->FullscreenStateChanged(); 743 command_controller_->FullscreenStateChanged();
744 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); 744 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
745 } 745 }
746 746
747 /////////////////////////////////////////////////////////////////////////////// 747 ///////////////////////////////////////////////////////////////////////////////
748 // Browser, Assorted browser commands: 748 // Browser, Assorted browser commands:
749 749
750 void Browser::ToggleFullscreenMode() {
751 fullscreen_controller_->ToggleFullscreenMode();
752 }
753
754 void Browser::ToggleFullscreenModeWithExtension(const GURL& extension_url) { 750 void Browser::ToggleFullscreenModeWithExtension(const GURL& extension_url) {
755 fullscreen_controller_->ToggleFullscreenModeWithExtension(extension_url); 751 fullscreen_controller_->ToggleFullscreenModeWithExtension(extension_url);
756 } 752 }
757 753
758 #if defined(OS_MACOSX) 754 #if defined(OS_MACOSX)
759 void Browser::TogglePresentationMode() { 755 void Browser::TogglePresentationMode() {
760 fullscreen_controller_->TogglePresentationMode(); 756 fullscreen_controller_->TogglePresentationMode();
761 } 757 }
762 #endif 758 #endif
763 759
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 fullscreen_controller_->HandleUserPressedEscape()) { 1386 fullscreen_controller_->HandleUserPressedEscape()) {
1391 return true; 1387 return true;
1392 } 1388 }
1393 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); 1389 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut);
1394 } 1390 }
1395 1391
1396 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { 1392 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
1397 window()->HandleKeyboardEvent(event); 1393 window()->HandleKeyboardEvent(event);
1398 } 1394 }
1399 1395
1400 void Browser::OnAcceptFullscreenPermission(
1401 const GURL& url,
1402 FullscreenExitBubbleType bubble_type) {
1403 fullscreen_controller_->OnAcceptFullscreenPermission(url, bubble_type);
1404 }
1405
1406 void Browser::OnDenyFullscreenPermission(FullscreenExitBubbleType bubble_type) {
1407 fullscreen_controller_->OnDenyFullscreenPermission(bubble_type);
1408 }
1409
1410 bool Browser::TabsNeedBeforeUnloadFired() { 1396 bool Browser::TabsNeedBeforeUnloadFired() {
1411 if (tabs_needing_before_unload_fired_.empty()) { 1397 if (tabs_needing_before_unload_fired_.empty()) {
1412 for (int i = 0; i < tab_count(); ++i) { 1398 for (int i = 0; i < tab_count(); ++i) {
1413 WebContents* contents = chrome::GetTabContentsAt(this, i)->web_contents(); 1399 WebContents* contents = chrome::GetTabContentsAt(this, i)->web_contents();
1414 if (contents->NeedToFireBeforeUnload()) 1400 if (contents->NeedToFireBeforeUnload())
1415 tabs_needing_before_unload_fired_.insert(contents); 1401 tabs_needing_before_unload_fired_.insert(contents);
1416 } 1402 }
1417 } 1403 }
1418 return !tabs_needing_before_unload_fired_.empty(); 1404 return !tabs_needing_before_unload_fired_.empty();
1419 } 1405 }
1420 1406
1421 bool Browser::IsFullscreenForTabOrPending() const {
1422 return fullscreen_controller_->IsFullscreenForTabOrPending();
1423 }
1424
1425 bool Browser::IsMouseLocked() const { 1407 bool Browser::IsMouseLocked() const {
1426 return fullscreen_controller_->IsMouseLocked(); 1408 return fullscreen_controller_->IsMouseLocked();
1427 } 1409 }
1428 1410
1429 void Browser::OnWindowDidShow() { 1411 void Browser::OnWindowDidShow() {
1430 if (window_has_shown_) 1412 if (window_has_shown_)
1431 return; 1413 return;
1432 window_has_shown_ = true; 1414 window_has_shown_ = true;
1433 1415
1434 // Nothing to do for non-tabbed windows. 1416 // Nothing to do for non-tabbed windows.
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 if (contents && !allow_js_access) { 2798 if (contents && !allow_js_access) {
2817 contents->web_contents()->GetController().LoadURL( 2799 contents->web_contents()->GetController().LoadURL(
2818 target_url, 2800 target_url,
2819 content::Referrer(), 2801 content::Referrer(),
2820 content::PAGE_TRANSITION_LINK, 2802 content::PAGE_TRANSITION_LINK,
2821 std::string()); // No extra headers. 2803 std::string()); // No extra headers.
2822 } 2804 }
2823 2805
2824 return contents != NULL; 2806 return contents != NULL;
2825 } 2807 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698