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

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

Issue 9702055: Automated tests for full screen & mouse lock M16 features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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) 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 471 }
472 472
473 // There may be pending file dialogs, we need to tell them that we've gone 473 // There may be pending file dialogs, we need to tell them that we've gone
474 // away so they don't try and call back to us. 474 // away so they don't try and call back to us.
475 if (select_file_dialog_.get()) 475 if (select_file_dialog_.get())
476 select_file_dialog_->ListenerDestroyed(); 476 select_file_dialog_->ListenerDestroyed();
477 477
478 TabRestoreServiceDestroyed(tab_restore_service_); 478 TabRestoreServiceDestroyed(tab_restore_service_);
479 } 479 }
480 480
481 bool Browser::IsFullscreenForTab() const { 481 bool Browser::IsFullscreenForTabOrPending() const {
482 return fullscreen_controller_->IsFullscreenForTab(); 482 return fullscreen_controller_->IsFullscreenForTabOrPending();
483 }
484
485 bool Browser::IsMouseLockedOrPending() const {
486 return fullscreen_controller_->IsMouseLockedOrPending();
483 } 487 }
484 488
485 // static 489 // static
486 Browser* Browser::Create(Profile* profile) { 490 Browser* Browser::Create(Profile* profile) {
487 Browser* browser = new Browser(TYPE_TABBED, profile); 491 Browser* browser = new Browser(TYPE_TABBED, profile);
488 browser->InitBrowserWindow(); 492 browser->InitBrowserWindow();
489 return browser; 493 return browser;
490 } 494 }
491 495
492 // static 496 // static
(...skipping 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after
4142 void Browser::EnumerateDirectory(WebContents* tab, int request_id, 4146 void Browser::EnumerateDirectory(WebContents* tab, int request_id,
4143 const FilePath& path) { 4147 const FilePath& path) {
4144 EnumerateDirectoryHelper(tab, request_id, path); 4148 EnumerateDirectoryHelper(tab, request_id, path);
4145 } 4149 }
4146 4150
4147 void Browser::ToggleFullscreenModeForTab(WebContents* tab, 4151 void Browser::ToggleFullscreenModeForTab(WebContents* tab,
4148 bool enter_fullscreen) { 4152 bool enter_fullscreen) {
4149 fullscreen_controller_->ToggleFullscreenModeForTab(tab, enter_fullscreen); 4153 fullscreen_controller_->ToggleFullscreenModeForTab(tab, enter_fullscreen);
4150 } 4154 }
4151 4155
4152 bool Browser::IsFullscreenForTab(const WebContents* tab) const { 4156 bool Browser::IsFullscreenForTabOrPending(const WebContents* tab) const {
4153 return fullscreen_controller_->IsFullscreenForTabOrPending(tab); 4157 return fullscreen_controller_->IsFullscreenForTabOrPending(tab);
4154 } 4158 }
4155 4159
4156 void Browser::JSOutOfMemory(WebContents* tab) { 4160 void Browser::JSOutOfMemory(WebContents* tab) {
4157 JSOutOfMemoryHelper(tab); 4161 JSOutOfMemoryHelper(tab);
4158 } 4162 }
4159 4163
4160 void Browser::RegisterProtocolHandler(WebContents* tab, 4164 void Browser::RegisterProtocolHandler(WebContents* tab,
4161 const std::string& protocol, 4165 const std::string& protocol,
4162 const GURL& url, 4166 const GURL& url,
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
5620 } else { 5624 } else {
5621 LoginUIServiceFactory::GetForProfile( 5625 LoginUIServiceFactory::GetForProfile(
5622 profile()->GetOriginalProfile())->ShowLoginUI(); 5626 profile()->GetOriginalProfile())->ShowLoginUI();
5623 } 5627 }
5624 #endif 5628 #endif
5625 } 5629 }
5626 5630
5627 void Browser::ToggleSpeechInput() { 5631 void Browser::ToggleSpeechInput() {
5628 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5632 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5629 } 5633 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698