| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 webkit::npapi::WebPluginImpl(frame, params, path, AsWeakPtr()) {} | 180 webkit::npapi::WebPluginImpl(frame, params, path, AsWeakPtr()) {} |
| 181 virtual ~WebPluginImplWithPageDelegate() {} | 181 virtual ~WebPluginImplWithPageDelegate() {} |
| 182 private: | 182 private: |
| 183 DISALLOW_COPY_AND_ASSIGN(WebPluginImplWithPageDelegate); | 183 DISALLOW_COPY_AND_ASSIGN(WebPluginImplWithPageDelegate); |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 FilePath GetWebKitRootDirFilePath() { | 186 FilePath GetWebKitRootDirFilePath() { |
| 187 FilePath basePath; | 187 FilePath basePath; |
| 188 PathService::Get(base::DIR_SOURCE_ROOT, &basePath); | 188 PathService::Get(base::DIR_SOURCE_ROOT, &basePath); |
| 189 if (file_util::PathExists(basePath.Append(FILE_PATH_LITERAL("chrome")))) { | 189 if (file_util::PathExists(basePath.Append(FILE_PATH_LITERAL("chrome")))) { |
| 190 // We're in a WebKit-in-chrome checkout. |
| 190 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 191 return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
| 191 } else { | 192 } else if (file_util::PathExists( |
| 192 // WebKit/Source/WebKit/chromium/ -> WebKit/ | 193 basePath.Append(FILE_PATH_LITERAL("chromium")))) { |
| 194 // We're in a WebKit-only checkout on Windows. |
| 195 return basePath.Append(FILE_PATH_LITERAL("../..")); |
| 196 } else if (file_util::PathExists( |
| 197 basePath.Append(FILE_PATH_LITERAL("webkit/support")))) { |
| 198 // We're in a WebKit-only/xcodebuild checkout on Mac |
| 193 return basePath.Append(FILE_PATH_LITERAL("../../..")); | 199 return basePath.Append(FILE_PATH_LITERAL("../../..")); |
| 194 } | 200 } |
| 201 // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the |
| 202 // WebKit root. That, or we have no idea where we are. |
| 203 return basePath; |
| 195 } | 204 } |
| 196 | 205 |
| 197 class WebKitClientMessageLoopImpl | 206 class WebKitClientMessageLoopImpl |
| 198 : public WebDevToolsAgentClient::WebKitClientMessageLoop { | 207 : public WebDevToolsAgentClient::WebKitClientMessageLoop { |
| 199 public: | 208 public: |
| 200 WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) {} | 209 WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) {} |
| 201 virtual ~WebKitClientMessageLoopImpl() { | 210 virtual ~WebKitClientMessageLoopImpl() { |
| 202 message_loop_ = NULL; | 211 message_loop_ = NULL; |
| 203 } | 212 } |
| 204 virtual void run() { | 213 virtual void run() { |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 // Logging | 677 // Logging |
| 669 void EnableWebCoreLogChannels(const std::string& channels) { | 678 void EnableWebCoreLogChannels(const std::string& channels) { |
| 670 webkit_glue::EnableWebCoreLogChannels(channels); | 679 webkit_glue::EnableWebCoreLogChannels(channels); |
| 671 } | 680 } |
| 672 | 681 |
| 673 void SetGamepadData(const WebKit::WebGamepads& pads) { | 682 void SetGamepadData(const WebKit::WebGamepads& pads) { |
| 674 test_environment->webkit_platform_support()->setGamepadData(pads); | 683 test_environment->webkit_platform_support()->setGamepadData(pads); |
| 675 } | 684 } |
| 676 | 685 |
| 677 } // namespace webkit_support | 686 } // namespace webkit_support |
| OLD | NEW |