| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 source->GetController().LoadURLWithParams(load_url_params); | 300 source->GetController().LoadURLWithParams(load_url_params); |
| 301 return source; | 301 return source; |
| 302 } | 302 } |
| 303 | 303 |
| 304 void Shell::LoadingStateChanged(WebContents* source, | 304 void Shell::LoadingStateChanged(WebContents* source, |
| 305 bool to_different_document) { | 305 bool to_different_document) { |
| 306 UpdateNavigationControls(to_different_document); | 306 UpdateNavigationControls(to_different_document); |
| 307 PlatformSetIsLoading(source->IsLoading()); | 307 PlatformSetIsLoading(source->IsLoading()); |
| 308 } | 308 } |
| 309 | 309 |
| 310 void Shell::EnterFullscreenModeForTab(WebContents* web_contents, |
| 311 const GURL& origin) { |
| 312 ToggleFullscreenModeForTab(web_contents, true); |
| 313 } |
| 314 |
| 315 void Shell::ExitFullscreenModeForTab(WebContents* web_contents) { |
| 316 ToggleFullscreenModeForTab(web_contents, false); |
| 317 } |
| 318 |
| 310 void Shell::ToggleFullscreenModeForTab(WebContents* web_contents, | 319 void Shell::ToggleFullscreenModeForTab(WebContents* web_contents, |
| 311 bool enter_fullscreen) { | 320 bool enter_fullscreen) { |
| 312 #if defined(OS_ANDROID) | 321 #if defined(OS_ANDROID) |
| 313 PlatformToggleFullscreenModeForTab(web_contents, enter_fullscreen); | 322 PlatformToggleFullscreenModeForTab(web_contents, enter_fullscreen); |
| 314 #endif | 323 #endif |
| 315 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 324 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 316 switches::kDumpRenderTree)) | 325 switches::kDumpRenderTree)) |
| 317 return; | 326 return; |
| 318 if (is_fullscreen_ != enter_fullscreen) { | 327 if (is_fullscreen_ != enter_fullscreen) { |
| 319 is_fullscreen_ = enter_fullscreen; | 328 is_fullscreen_ = enter_fullscreen; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 devtools_frontend_->Activate(); | 435 devtools_frontend_->Activate(); |
| 427 devtools_frontend_->Focus(); | 436 devtools_frontend_->Focus(); |
| 428 } | 437 } |
| 429 | 438 |
| 430 void Shell::OnDevToolsWebContentsDestroyed() { | 439 void Shell::OnDevToolsWebContentsDestroyed() { |
| 431 devtools_observer_.reset(); | 440 devtools_observer_.reset(); |
| 432 devtools_frontend_ = NULL; | 441 devtools_frontend_ = NULL; |
| 433 } | 442 } |
| 434 | 443 |
| 435 } // namespace content | 444 } // namespace content |
| OLD | NEW |