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

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

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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/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
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
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
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_browser_main.cc ('k') | content/shell/browser/shell_mojo_test_utils_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698