OLD | NEW |
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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 } | 499 } |
500 | 500 |
501 // There may be pending file dialogs, we need to tell them that we've gone | 501 // There may be pending file dialogs, we need to tell them that we've gone |
502 // away so they don't try and call back to us. | 502 // away so they don't try and call back to us. |
503 if (select_file_dialog_.get()) | 503 if (select_file_dialog_.get()) |
504 select_file_dialog_->ListenerDestroyed(); | 504 select_file_dialog_->ListenerDestroyed(); |
505 | 505 |
506 TabRestoreServiceDestroyed(tab_restore_service_); | 506 TabRestoreServiceDestroyed(tab_restore_service_); |
507 } | 507 } |
508 | 508 |
509 bool Browser::IsFullscreenForTab() const { | 509 bool Browser::IsFullscreenForTabOrPending() const { |
510 return fullscreen_controller_->IsFullscreenForTab(); | 510 return fullscreen_controller_->IsFullscreenForTabOrPending(); |
| 511 } |
| 512 |
| 513 bool Browser::IsMouseLockedOrPending() const { |
| 514 return fullscreen_controller_->IsMouseLockedOrPending(); |
511 } | 515 } |
512 | 516 |
513 // static | 517 // static |
514 Browser* Browser::Create(Profile* profile) { | 518 Browser* Browser::Create(Profile* profile) { |
515 Browser* browser = new Browser(TYPE_TABBED, profile); | 519 Browser* browser = new Browser(TYPE_TABBED, profile); |
516 browser->InitBrowserWindow(); | 520 browser->InitBrowserWindow(); |
517 return browser; | 521 return browser; |
518 } | 522 } |
519 | 523 |
520 // static | 524 // static |
(...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4192 void Browser::EnumerateDirectory(WebContents* tab, int request_id, | 4196 void Browser::EnumerateDirectory(WebContents* tab, int request_id, |
4193 const FilePath& path) { | 4197 const FilePath& path) { |
4194 EnumerateDirectoryHelper(tab, request_id, path); | 4198 EnumerateDirectoryHelper(tab, request_id, path); |
4195 } | 4199 } |
4196 | 4200 |
4197 void Browser::ToggleFullscreenModeForTab(WebContents* tab, | 4201 void Browser::ToggleFullscreenModeForTab(WebContents* tab, |
4198 bool enter_fullscreen) { | 4202 bool enter_fullscreen) { |
4199 fullscreen_controller_->ToggleFullscreenModeForTab(tab, enter_fullscreen); | 4203 fullscreen_controller_->ToggleFullscreenModeForTab(tab, enter_fullscreen); |
4200 } | 4204 } |
4201 | 4205 |
4202 bool Browser::IsFullscreenForTab(const WebContents* tab) const { | 4206 bool Browser::IsFullscreenForTabOrPending(const WebContents* tab) const { |
4203 return fullscreen_controller_->IsFullscreenForTabOrPending(tab); | 4207 return fullscreen_controller_->IsFullscreenForTabOrPending(tab); |
4204 } | 4208 } |
4205 | 4209 |
4206 void Browser::JSOutOfMemory(WebContents* tab) { | 4210 void Browser::JSOutOfMemory(WebContents* tab) { |
4207 JSOutOfMemoryHelper(tab); | 4211 JSOutOfMemoryHelper(tab); |
4208 } | 4212 } |
4209 | 4213 |
4210 void Browser::RegisterProtocolHandler(WebContents* tab, | 4214 void Browser::RegisterProtocolHandler(WebContents* tab, |
4211 const std::string& protocol, | 4215 const std::string& protocol, |
4212 const GURL& url, | 4216 const GURL& url, |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5677 } else { | 5681 } else { |
5678 LoginUIServiceFactory::GetForProfile( | 5682 LoginUIServiceFactory::GetForProfile( |
5679 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5683 profile()->GetOriginalProfile())->ShowLoginUI(false); |
5680 } | 5684 } |
5681 #endif | 5685 #endif |
5682 } | 5686 } |
5683 | 5687 |
5684 void Browser::ToggleSpeechInput() { | 5688 void Browser::ToggleSpeechInput() { |
5685 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5689 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5686 } | 5690 } |
OLD | NEW |