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

Side by Side Diff: content/shell/browser/shell.cc

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make try happy Created 5 years, 11 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
« no previous file with comments | « content/shell/browser/shell.h ('k') | extensions/browser/app_window/app_window.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « content/shell/browser/shell.h ('k') | extensions/browser/app_window/app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698