| OLD | NEW |
| 1 // Copyright (c) 2011 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.h" | 5 #include "content/shell/shell_browser_main.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" |
| 11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 39 devtools_delegate_(NULL) { | 39 devtools_delegate_(NULL) { |
| 40 ShellContentBrowserClient* shell_browser_client = | 40 ShellContentBrowserClient* shell_browser_client = |
| 41 static_cast<ShellContentBrowserClient*>( | 41 static_cast<ShellContentBrowserClient*>( |
| 42 content::GetContentClient()->browser()); | 42 content::GetContentClient()->browser()); |
| 43 shell_browser_client->set_shell_browser_main_parts(this); | 43 shell_browser_client->set_shell_browser_main_parts(this); |
| 44 } | 44 } |
| 45 | 45 |
| 46 ShellBrowserMainParts::~ShellBrowserMainParts() { | 46 ShellBrowserMainParts::~ShellBrowserMainParts() { |
| 47 } | 47 } |
| 48 | 48 |
| 49 MessageLoop* ShellBrowserMainParts::GetMainMessageLoop() { |
| 50 return NULL; |
| 51 } |
| 52 |
| 49 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 53 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
| 50 browser_context_.reset(new ShellBrowserContext(this)); | 54 browser_context_.reset(new ShellBrowserContext(this)); |
| 51 | 55 |
| 52 Shell::PlatformInitialize(); | 56 Shell::PlatformInitialize(); |
| 53 net::NetModule::SetResourceProvider(Shell::PlatformResourceProvider); | 57 net::NetModule::SetResourceProvider(Shell::PlatformResourceProvider); |
| 54 | 58 |
| 55 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 59 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 56 if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) { | 60 if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) { |
| 57 std::string port_str = | 61 std::string port_str = |
| 58 command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort); | 62 command_line.GetSwitchValueASCII(switches::kRemoteDebuggingPort); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 83 return false; | 87 return false; |
| 84 } | 88 } |
| 85 | 89 |
| 86 ui::Clipboard* ShellBrowserMainParts::GetClipboard() { | 90 ui::Clipboard* ShellBrowserMainParts::GetClipboard() { |
| 87 if (!clipboard_.get()) | 91 if (!clipboard_.get()) |
| 88 clipboard_.reset(new ui::Clipboard()); | 92 clipboard_.reset(new ui::Clipboard()); |
| 89 return clipboard_.get(); | 93 return clipboard_.get(); |
| 90 } | 94 } |
| 91 | 95 |
| 92 } // namespace | 96 } // namespace |
| OLD | NEW |