| 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/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 class TestNavigationManagerThrottle : public NavigationThrottle { | 340 class TestNavigationManagerThrottle : public NavigationThrottle { |
| 341 public: | 341 public: |
| 342 TestNavigationManagerThrottle(NavigationHandle* handle, | 342 TestNavigationManagerThrottle(NavigationHandle* handle, |
| 343 base::Closure on_will_start_request_closure, | 343 base::Closure on_will_start_request_closure, |
| 344 base::Closure on_will_process_response_closure) | 344 base::Closure on_will_process_response_closure) |
| 345 : NavigationThrottle(handle), | 345 : NavigationThrottle(handle), |
| 346 on_will_start_request_closure_(on_will_start_request_closure), | 346 on_will_start_request_closure_(on_will_start_request_closure), |
| 347 on_will_process_response_closure_(on_will_process_response_closure) {} | 347 on_will_process_response_closure_(on_will_process_response_closure) {} |
| 348 ~TestNavigationManagerThrottle() override {} | 348 ~TestNavigationManagerThrottle() override {} |
| 349 | 349 |
| 350 const char* GetNameForLogging() override { |
| 351 return "TestNavigationManagerThrottle"; |
| 352 } |
| 353 |
| 350 private: | 354 private: |
| 351 // NavigationThrottle: | 355 // NavigationThrottle: |
| 352 NavigationThrottle::ThrottleCheckResult WillStartRequest() override { | 356 NavigationThrottle::ThrottleCheckResult WillStartRequest() override { |
| 353 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 357 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 354 on_will_start_request_closure_); | 358 on_will_start_request_closure_); |
| 355 return NavigationThrottle::DEFER; | 359 return NavigationThrottle::DEFER; |
| 356 } | 360 } |
| 357 | 361 |
| 358 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override { | 362 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override { |
| 359 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 363 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| (...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 bool user_gesture, | 2013 bool user_gesture, |
| 2010 bool last_unlocked_by_target, | 2014 bool last_unlocked_by_target, |
| 2011 bool privileged) { | 2015 bool privileged) { |
| 2012 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 2016 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
| 2013 process->GetChannel(), | 2017 process->GetChannel(), |
| 2014 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, | 2018 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, |
| 2015 privileged)); | 2019 privileged)); |
| 2016 } | 2020 } |
| 2017 | 2021 |
| 2018 } // namespace content | 2022 } // namespace content |
| OLD | NEW |