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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 } | 306 } |
307 | 307 |
308 bool Shell::IsFullscreenForTabOrPending(const WebContents* web_contents) const { | 308 bool Shell::IsFullscreenForTabOrPending(const WebContents* web_contents) const { |
309 #if defined(OS_ANDROID) | 309 #if defined(OS_ANDROID) |
310 return PlatformIsFullscreenForTabOrPending(web_contents); | 310 return PlatformIsFullscreenForTabOrPending(web_contents); |
311 #else | 311 #else |
312 return is_fullscreen_; | 312 return is_fullscreen_; |
313 #endif | 313 #endif |
314 } | 314 } |
315 | 315 |
316 blink::WebDisplayMode Shell::GetDisplayMode( | |
317 const WebContents* web_contents) const { | |
318 // FIXME : should return blink::WebDisplayModeFullscreen wherever user puts a | |
scheib
2015/04/13 18:30:22
TODO comments. Cite a follow up issue.
| |
319 // browser window into fullscreen (not only in case of renderer-initiated | |
320 // fullscreen mode). | |
321 return IsFullscreenForTabOrPending(web_contents) ? | |
322 blink::WebDisplayModeFullscreen : blink::WebDisplayModeBrowser; | |
323 } | |
324 | |
316 void Shell::RequestToLockMouse(WebContents* web_contents, | 325 void Shell::RequestToLockMouse(WebContents* web_contents, |
317 bool user_gesture, | 326 bool user_gesture, |
318 bool last_unlocked_by_target) { | 327 bool last_unlocked_by_target) { |
319 web_contents->GotResponseToLockMouseRequest(true); | 328 web_contents->GotResponseToLockMouseRequest(true); |
320 } | 329 } |
321 | 330 |
322 void Shell::CloseContents(WebContents* source) { | 331 void Shell::CloseContents(WebContents* source) { |
323 Close(); | 332 Close(); |
324 } | 333 } |
325 | 334 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
415 devtools_frontend_->Activate(); | 424 devtools_frontend_->Activate(); |
416 devtools_frontend_->Focus(); | 425 devtools_frontend_->Focus(); |
417 } | 426 } |
418 | 427 |
419 void Shell::OnDevToolsWebContentsDestroyed() { | 428 void Shell::OnDevToolsWebContentsDestroyed() { |
420 devtools_observer_.reset(); | 429 devtools_observer_.reset(); |
421 devtools_frontend_ = NULL; | 430 devtools_frontend_ = NULL; |
422 } | 431 } |
423 | 432 |
424 } // namespace content | 433 } // namespace content |
OLD | NEW |