| 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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 if (windows_[i] == this) { | 86 if (windows_[i] == this) { |
| 87 windows_.erase(windows_.begin() + i); | 87 windows_.erase(windows_.begin() + i); |
| 88 break; | 88 break; |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 if (windows_.empty() && quit_message_loop_) { | 92 if (windows_.empty() && quit_message_loop_) { |
| 93 if (headless_) | 93 if (headless_) |
| 94 PlatformExit(); | 94 PlatformExit(); |
| 95 base::ThreadTaskRunnerHandle::Get()->PostTask( | 95 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 96 FROM_HERE, base::MessageLoop::QuitClosure()); | 96 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 Shell* Shell::CreateShell(WebContents* web_contents, | 100 Shell* Shell::CreateShell(WebContents* web_contents, |
| 101 const gfx::Size& initial_size) { | 101 const gfx::Size& initial_size) { |
| 102 Shell* shell = new Shell(web_contents); | 102 Shell* shell = new Shell(web_contents); |
| 103 shell->PlatformCreateWindow(initial_size.width(), initial_size.height()); | 103 shell->PlatformCreateWindow(initial_size.width(), initial_size.height()); |
| 104 | 104 |
| 105 shell->web_contents_.reset(web_contents); | 105 shell->web_contents_.reset(web_contents); |
| 106 web_contents->SetDelegate(shell); | 106 web_contents->SetDelegate(shell); |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 devtools_frontend_->Activate(); | 433 devtools_frontend_->Activate(); |
| 434 devtools_frontend_->Focus(); | 434 devtools_frontend_->Focus(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 void Shell::OnDevToolsWebContentsDestroyed() { | 437 void Shell::OnDevToolsWebContentsDestroyed() { |
| 438 devtools_observer_.reset(); | 438 devtools_observer_.reset(); |
| 439 devtools_frontend_ = NULL; | 439 devtools_frontend_ = NULL; |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace content | 442 } // namespace content |
| OLD | NEW |