| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 } | 490 } |
| 491 | 491 |
| 492 // There may be pending file dialogs, we need to tell them that we've gone | 492 // There may be pending file dialogs, we need to tell them that we've gone |
| 493 // away so they don't try and call back to us. | 493 // away so they don't try and call back to us. |
| 494 if (select_file_dialog_.get()) | 494 if (select_file_dialog_.get()) |
| 495 select_file_dialog_->ListenerDestroyed(); | 495 select_file_dialog_->ListenerDestroyed(); |
| 496 | 496 |
| 497 TabRestoreServiceDestroyed(tab_restore_service_); | 497 TabRestoreServiceDestroyed(tab_restore_service_); |
| 498 } | 498 } |
| 499 | 499 |
| 500 bool Browser::IsFullscreenForTab() const { | 500 bool Browser::IsFullscreenForTabOrPending() const { |
| 501 return fullscreen_controller_->IsFullscreenForTab(); | 501 return fullscreen_controller_->IsFullscreenForTabOrPending(); |
| 502 } |
| 503 |
| 504 bool Browser::IsMouseLockedOrPending() const { |
| 505 return fullscreen_controller_->IsMouseLockedOrPending(); |
| 502 } | 506 } |
| 503 | 507 |
| 504 // static | 508 // static |
| 505 Browser* Browser::Create(Profile* profile) { | 509 Browser* Browser::Create(Profile* profile) { |
| 506 Browser* browser = new Browser(TYPE_TABBED, profile); | 510 Browser* browser = new Browser(TYPE_TABBED, profile); |
| 507 browser->InitBrowserWindow(); | 511 browser->InitBrowserWindow(); |
| 508 return browser; | 512 return browser; |
| 509 } | 513 } |
| 510 | 514 |
| 511 // static | 515 // static |
| (...skipping 3700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4212 void Browser::EnumerateDirectory(WebContents* tab, int request_id, | 4216 void Browser::EnumerateDirectory(WebContents* tab, int request_id, |
| 4213 const FilePath& path) { | 4217 const FilePath& path) { |
| 4214 EnumerateDirectoryHelper(tab, request_id, path); | 4218 EnumerateDirectoryHelper(tab, request_id, path); |
| 4215 } | 4219 } |
| 4216 | 4220 |
| 4217 void Browser::ToggleFullscreenModeForTab(WebContents* tab, | 4221 void Browser::ToggleFullscreenModeForTab(WebContents* tab, |
| 4218 bool enter_fullscreen) { | 4222 bool enter_fullscreen) { |
| 4219 fullscreen_controller_->ToggleFullscreenModeForTab(tab, enter_fullscreen); | 4223 fullscreen_controller_->ToggleFullscreenModeForTab(tab, enter_fullscreen); |
| 4220 } | 4224 } |
| 4221 | 4225 |
| 4222 bool Browser::IsFullscreenForTab(const WebContents* tab) const { | 4226 bool Browser::IsFullscreenForTabOrPending(const WebContents* tab) const { |
| 4223 return fullscreen_controller_->IsFullscreenForTabOrPending(tab); | 4227 return fullscreen_controller_->IsFullscreenForTabOrPending(tab); |
| 4224 } | 4228 } |
| 4225 | 4229 |
| 4226 void Browser::JSOutOfMemory(WebContents* tab) { | 4230 void Browser::JSOutOfMemory(WebContents* tab) { |
| 4227 JSOutOfMemoryHelper(tab); | 4231 JSOutOfMemoryHelper(tab); |
| 4228 } | 4232 } |
| 4229 | 4233 |
| 4230 void Browser::RegisterProtocolHandler(WebContents* tab, | 4234 void Browser::RegisterProtocolHandler(WebContents* tab, |
| 4231 const std::string& protocol, | 4235 const std::string& protocol, |
| 4232 const GURL& url, | 4236 const GURL& url, |
| (...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5674 ShowSingletonTabOverwritingNTP(params); | 5678 ShowSingletonTabOverwritingNTP(params); |
| 5675 } else { | 5679 } else { |
| 5676 LoginUIServiceFactory::GetForProfile( | 5680 LoginUIServiceFactory::GetForProfile( |
| 5677 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5681 profile()->GetOriginalProfile())->ShowLoginUI(false); |
| 5678 } | 5682 } |
| 5679 } | 5683 } |
| 5680 | 5684 |
| 5681 void Browser::ToggleSpeechInput() { | 5685 void Browser::ToggleSpeechInput() { |
| 5682 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5686 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5683 } | 5687 } |
| OLD | NEW |