| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shell_browser_main_parts.h" | 5 #include "content/shell/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 static GURL GetStartupURL() { | 29 static GURL GetStartupURL() { |
| 30 const CommandLine::StringVector& args = | 30 const CommandLine::StringVector& args = |
| 31 CommandLine::ForCurrentProcess()->GetArgs(); | 31 CommandLine::ForCurrentProcess()->GetArgs(); |
| 32 if (args.empty()) | 32 if (args.empty()) |
| 33 return GURL("http://www.google.com/"); | 33 return GURL("http://www.google.com/"); |
| 34 | 34 |
| 35 return GURL(args[0]); | 35 return GURL(args[0]); |
| 36 } | 36 } |
| 37 | 37 |
| 38 ShellBrowserMainParts::ShellBrowserMainParts( | 38 ShellBrowserMainParts::ShellBrowserMainParts( |
| 39 const content::MainFunctionParams& parameters) | 39 const MainFunctionParams& parameters) |
| 40 : BrowserMainParts(), | 40 : BrowserMainParts(), |
| 41 parameters_(parameters), | 41 parameters_(parameters), |
| 42 run_message_loop_(true), | 42 run_message_loop_(true), |
| 43 devtools_delegate_(NULL) { | 43 devtools_delegate_(NULL) { |
| 44 } | 44 } |
| 45 | 45 |
| 46 ShellBrowserMainParts::~ShellBrowserMainParts() { | 46 ShellBrowserMainParts::~ShellBrowserMainParts() { |
| 47 } | 47 } |
| 48 | 48 |
| 49 #if !defined(OS_MACOSX) | 49 #if !defined(OS_MACOSX) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 return !run_message_loop_; | 103 return !run_message_loop_; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void ShellBrowserMainParts::PostMainMessageLoopRun() { | 106 void ShellBrowserMainParts::PostMainMessageLoopRun() { |
| 107 if (devtools_delegate_) | 107 if (devtools_delegate_) |
| 108 devtools_delegate_->Stop(); | 108 devtools_delegate_->Stop(); |
| 109 browser_context_.reset(); | 109 browser_context_.reset(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace | 112 } // namespace |
| OLD | NEW |