| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/test_runner/web_test_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
| 6 | 6 |
| 7 #include <cctype> | 7 #include <cctype> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 namespace content { | 56 namespace content { |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 class HostMethodTask : public WebMethodTask<WebTestProxyBase> { | 60 class HostMethodTask : public WebMethodTask<WebTestProxyBase> { |
| 61 public: | 61 public: |
| 62 typedef void (WebTestProxyBase::*CallbackMethodType)(); | 62 typedef void (WebTestProxyBase::*CallbackMethodType)(); |
| 63 HostMethodTask(WebTestProxyBase* object, CallbackMethodType callback) | 63 HostMethodTask(WebTestProxyBase* object, CallbackMethodType callback) |
| 64 : WebMethodTask<WebTestProxyBase>(object), callback_(callback) {} | 64 : WebMethodTask<WebTestProxyBase>(object), callback_(callback) {} |
| 65 | 65 |
| 66 virtual void runIfValid() OVERRIDE { (m_object->*callback_)(); } | 66 virtual void RunIfValid() OVERRIDE { (object_->*callback_)(); } |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 CallbackMethodType callback_; | 69 CallbackMethodType callback_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 void PrintFrameDescription(WebTestDelegate* delegate, blink::WebFrame* frame) { | 72 void PrintFrameDescription(WebTestDelegate* delegate, blink::WebFrame* frame) { |
| 73 std::string name8 = frame->uniqueName().utf8(); | 73 std::string name8 = frame->uniqueName().utf8(); |
| 74 if (frame == frame->view()->mainFrame()) { | 74 if (frame == frame->view()->mainFrame()) { |
| 75 if (!name8.length()) { | 75 if (!name8.length()) { |
| 76 delegate->printMessage("main frame"); | 76 delegate->printMessage("main frame"); |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 if (!push_client_.get()) | 1280 if (!push_client_.get()) |
| 1281 push_client_.reset(new MockWebPushClient); | 1281 push_client_.reset(new MockWebPushClient); |
| 1282 return push_client_.get(); | 1282 return push_client_.get(); |
| 1283 } | 1283 } |
| 1284 | 1284 |
| 1285 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { | 1285 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { |
| 1286 return GetPushClientMock(); | 1286 return GetPushClientMock(); |
| 1287 } | 1287 } |
| 1288 | 1288 |
| 1289 } // namespace content | 1289 } // namespace content |
| OLD | NEW |