| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BLIMP_ENGINE_TESTING_SESSION_TEST_BLIMP_ENGINE_SESSION_H_ |
| 6 #define BLIMP_ENGINE_TESTING_SESSION_TEST_BLIMP_ENGINE_SESSION_H_ |
| 7 |
| 8 #include "blimp/engine/common/blimp_browser_context.h" |
| 9 #include "blimp/engine/session/blimp_engine_session.h" |
| 10 |
| 11 namespace blimp { |
| 12 namespace engine { |
| 13 |
| 14 // Blimp testing implementation of BlimpEngineSession. Class to extend |
| 15 // class BlimpEngineSession for testing. This rewrites the passed in |
| 16 // Blimp message url if necessary. |
| 17 class TestBlimpEngineSession : public BlimpEngineSession { |
| 18 public: |
| 19 TestBlimpEngineSession( |
| 20 std::unique_ptr<BlimpBrowserContext> browser_context, |
| 21 net::NetLog* net_log, |
| 22 BlimpEngineConfig* config, |
| 23 SettingsManager* settings_manager); |
| 24 ~TestBlimpEngineSession() = default; |
| 25 |
| 26 // Override BlimpEngineSession::BlimpEngineSession |
| 27 // This object handles NavigationMessage::LOAD_URL |
| 28 // url rewritting with testing url handler. |
| 29 void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
| 30 const net::CompletionCallback& callback) override; |
| 31 }; |
| 32 |
| 33 } // namespace engine |
| 34 } // namespace blimp |
| 35 |
| 36 #endif // BLIMP_ENGINE_TESTING_SESSION_TEST_BLIMP_ENGINE_SESSION_H_ |
| OLD | NEW |