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 (file_util::PathExists(basePath.Append(FILE_PATH_LITERAL("chrome")))) { | 224 if (file_util::PathExists( |
| 225 basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")))) { |
225 // We're in a WebKit-in-chrome checkout. | 226 // We're in a WebKit-in-chrome checkout. |
226 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 227 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
227 } else if (file_util::PathExists( | 228 } else if (file_util::PathExists( |
228 basePath.Append(FILE_PATH_LITERAL("chromium")))) { | 229 basePath.Append(FILE_PATH_LITERAL("chromium")))) { |
229 // We're in a WebKit-only checkout on Windows. | 230 // We're in a WebKit-only checkout on Windows. |
230 return basePath.Append(FILE_PATH_LITERAL("../..")); | 231 return basePath.Append(FILE_PATH_LITERAL("../..")); |
231 } else if (file_util::PathExists( | 232 } else if (file_util::PathExists( |
232 basePath.Append(FILE_PATH_LITERAL("webkit/support")))) { | 233 basePath.Append(FILE_PATH_LITERAL("webkit/support")))) { |
233 // We're in a WebKit-only/xcodebuild checkout on Mac | 234 // We're in a WebKit-only/xcodebuild checkout on Mac |
234 return basePath.Append(FILE_PATH_LITERAL("../../..")); | 235 return basePath.Append(FILE_PATH_LITERAL("../../..")); |
235 } | 236 } |
236 // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the | 237 // 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. | 238 // WebKit root. That, or we have no idea where we are. |
238 return basePath; | 239 return basePath; |
239 } | 240 } |
240 | 241 |
241 class WebKitClientMessageLoopImpl | 242 class WebKitClientMessageLoopImpl |
242 : public WebDevToolsAgentClient::WebKitClientMessageLoop { | 243 : public WebDevToolsAgentClient::WebKitClientMessageLoop { |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // Logging | 782 // Logging |
782 void EnableWebCoreLogChannels(const std::string& channels) { | 783 void EnableWebCoreLogChannels(const std::string& channels) { |
783 webkit_glue::EnableWebCoreLogChannels(channels); | 784 webkit_glue::EnableWebCoreLogChannels(channels); |
784 } | 785 } |
785 | 786 |
786 void SetGamepadData(const WebKit::WebGamepads& pads) { | 787 void SetGamepadData(const WebKit::WebGamepads& pads) { |
787 test_environment->webkit_platform_support()->setGamepadData(pads); | 788 test_environment->webkit_platform_support()->setGamepadData(pads); |
788 } | 789 } |
789 | 790 |
790 } // namespace webkit_support | 791 } // namespace webkit_support |
OLD | NEW |