Chromium Code Reviews| 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/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 #include "grit/net_resources.h" | 22 #include "grit/net_resources.h" |
| 23 #include "net/base/net_module.h" | 23 #include "net/base/net_module.h" |
| 24 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
| 26 | 26 |
| 27 #if defined(OS_ANDROID) | 27 #if defined(OS_ANDROID) |
| 28 #include "net/base/network_change_notifier.h" | 28 #include "net/base/network_change_notifier.h" |
| 29 #include "net/android/network_change_notifier_factory_android.h" | 29 #include "net/android/network_change_notifier_factory_android.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 #if defined(OS_LINUX) && defined(USE_AURA) | |
| 33 #include "ui/base/touch/touch_factory.h" | |
| 34 #endif | |
| 35 | |
| 32 namespace content { | 36 namespace content { |
| 33 | 37 |
| 34 namespace { | 38 namespace { |
| 35 | 39 |
| 36 static GURL GetStartupURL() { | 40 static GURL GetStartupURL() { |
| 37 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 41 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 38 if (command_line->HasSwitch(switches::kContentBrowserTest)) | 42 if (command_line->HasSwitch(switches::kContentBrowserTest)) |
| 39 return GURL(); | 43 return GURL(); |
| 40 const CommandLine::StringVector& args = command_line->GetArgs(); | 44 const CommandLine::StringVector& args = command_line->GetArgs(); |
| 41 | 45 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 72 parameters_(parameters), | 76 parameters_(parameters), |
| 73 run_message_loop_(true), | 77 run_message_loop_(true), |
| 74 devtools_delegate_(NULL) { | 78 devtools_delegate_(NULL) { |
| 75 } | 79 } |
| 76 | 80 |
| 77 ShellBrowserMainParts::~ShellBrowserMainParts() { | 81 ShellBrowserMainParts::~ShellBrowserMainParts() { |
| 78 } | 82 } |
| 79 | 83 |
| 80 #if !defined(OS_MACOSX) | 84 #if !defined(OS_MACOSX) |
| 81 void ShellBrowserMainParts::PreMainMessageLoopStart() { | 85 void ShellBrowserMainParts::PreMainMessageLoopStart() { |
| 86 #if defined(OS_LINUX) && defined(USE_AURA) | |
|
jochen (gone - plz use gerrit)
2012/09/26 18:41:57
web_contents_impl uses defined(USE_AURA) && define
sadrul
2012/09/26 19:45:54
Done.
| |
| 87 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | |
| 88 #endif | |
| 82 } | 89 } |
| 83 #endif | 90 #endif |
| 84 | 91 |
| 85 void ShellBrowserMainParts::PostMainMessageLoopStart() { | 92 void ShellBrowserMainParts::PostMainMessageLoopStart() { |
| 86 #if defined(OS_ANDROID) | 93 #if defined(OS_ANDROID) |
| 87 MessageLoopForUI::current()->Start(); | 94 MessageLoopForUI::current()->Start(); |
| 88 #endif | 95 #endif |
| 89 } | 96 } |
| 90 | 97 |
| 91 void ShellBrowserMainParts::PreEarlyInitialization() { | 98 void ShellBrowserMainParts::PreEarlyInitialization() { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 #if defined(USE_AURA) | 153 #if defined(USE_AURA) |
| 147 Shell::PlatformExit(); | 154 Shell::PlatformExit(); |
| 148 #endif | 155 #endif |
| 149 if (devtools_delegate_) | 156 if (devtools_delegate_) |
| 150 devtools_delegate_->Stop(); | 157 devtools_delegate_->Stop(); |
| 151 browser_context_.reset(); | 158 browser_context_.reset(); |
| 152 off_the_record_browser_context_.reset(); | 159 off_the_record_browser_context_.reset(); |
| 153 } | 160 } |
| 154 | 161 |
| 155 } // namespace | 162 } // namespace |
| OLD | NEW |