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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
214 : webkit_support::TestWebPluginPageDelegate(), | 214 : webkit_support::TestWebPluginPageDelegate(), |
215 webkit::npapi::WebPluginImpl(frame, params, path, AsWeakPtr()) {} | 215 webkit::npapi::WebPluginImpl(frame, params, path, AsWeakPtr()) {} |
216 virtual ~WebPluginImplWithPageDelegate() {} | 216 virtual ~WebPluginImplWithPageDelegate() {} |
217 private: | 217 private: |
218 DISALLOW_COPY_AND_ASSIGN(WebPluginImplWithPageDelegate); | 218 DISALLOW_COPY_AND_ASSIGN(WebPluginImplWithPageDelegate); |
219 }; | 219 }; |
220 | 220 |
221 FilePath GetWebKitRootDirFilePath() { | 221 FilePath GetWebKitRootDirFilePath() { |
222 FilePath basePath; | 222 FilePath basePath; |
223 PathService::Get(base::DIR_SOURCE_ROOT, &basePath); | 223 PathService::Get(base::DIR_SOURCE_ROOT, &basePath); |
224 #if defined(OS_ANDROID) | |
225 // Local files are at file:///data/local/tmp/third_party/WebKit/ on Android. | |
226 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); | |
227 #else | |
tkent
2012/06/14 04:23:39
How about simply changing the following line like.
Hao Zheng
2012/06/18 04:34:04
Good idea. Done.
On 2012/06/14 04:23:39, Kent Tamu
| |
224 if (file_util::PathExists(basePath.Append(FILE_PATH_LITERAL("chrome")))) { | 228 if (file_util::PathExists(basePath.Append(FILE_PATH_LITERAL("chrome")))) { |
225 // We're in a WebKit-in-chrome checkout. | 229 // We're in a WebKit-in-chrome checkout. |
226 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 230 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
227 } else if (file_util::PathExists( | 231 } else if (file_util::PathExists( |
228 basePath.Append(FILE_PATH_LITERAL("chromium")))) { | 232 basePath.Append(FILE_PATH_LITERAL("chromium")))) { |
229 // We're in a WebKit-only checkout on Windows. | 233 // We're in a WebKit-only checkout on Windows. |
230 return basePath.Append(FILE_PATH_LITERAL("../..")); | 234 return basePath.Append(FILE_PATH_LITERAL("../..")); |
231 } else if (file_util::PathExists( | 235 } else if (file_util::PathExists( |
232 basePath.Append(FILE_PATH_LITERAL("webkit/support")))) { | 236 basePath.Append(FILE_PATH_LITERAL("webkit/support")))) { |
233 // We're in a WebKit-only/xcodebuild checkout on Mac | 237 // We're in a WebKit-only/xcodebuild checkout on Mac |
234 return basePath.Append(FILE_PATH_LITERAL("../../..")); | 238 return basePath.Append(FILE_PATH_LITERAL("../../..")); |
235 } | 239 } |
236 // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the | 240 // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the |
237 // WebKit root. That, or we have no idea where we are. | 241 // WebKit root. That, or we have no idea where we are. |
238 return basePath; | 242 return basePath; |
243 #endif | |
239 } | 244 } |
240 | 245 |
241 class WebKitClientMessageLoopImpl | 246 class WebKitClientMessageLoopImpl |
242 : public WebDevToolsAgentClient::WebKitClientMessageLoop { | 247 : public WebDevToolsAgentClient::WebKitClientMessageLoop { |
243 public: | 248 public: |
244 WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) {} | 249 WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) {} |
245 virtual ~WebKitClientMessageLoopImpl() { | 250 virtual ~WebKitClientMessageLoopImpl() { |
246 message_loop_ = NULL; | 251 message_loop_ = NULL; |
247 } | 252 } |
248 virtual void run() { | 253 virtual void run() { |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
781 // Logging | 786 // Logging |
782 void EnableWebCoreLogChannels(const std::string& channels) { | 787 void EnableWebCoreLogChannels(const std::string& channels) { |
783 webkit_glue::EnableWebCoreLogChannels(channels); | 788 webkit_glue::EnableWebCoreLogChannels(channels); |
784 } | 789 } |
785 | 790 |
786 void SetGamepadData(const WebKit::WebGamepads& pads) { | 791 void SetGamepadData(const WebKit::WebGamepads& pads) { |
787 test_environment->webkit_platform_support()->setGamepadData(pads); | 792 test_environment->webkit_platform_support()->setGamepadData(pads); |
788 } | 793 } |
789 | 794 |
790 } // namespace webkit_support | 795 } // namespace webkit_support |
OLD | NEW |