Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1131)

Unified Diff: blimp/engine/testing/session/blimp_engine_testing_session.h

Issue 2572563006: [Blimp] Refactor Blimp test engine with embedded test server and URL rewriting (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/engine/testing/session/blimp_engine_testing_session.h
diff --git a/blimp/engine/testing/session/blimp_engine_testing_session.h b/blimp/engine/testing/session/blimp_engine_testing_session.h
new file mode 100644
index 0000000000000000000000000000000000000000..2013f404313fe4537b4be8968c0695dae4fb46fa
--- /dev/null
+++ b/blimp/engine/testing/session/blimp_engine_testing_session.h
@@ -0,0 +1,39 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_ENGINE_TESTING_SESSION_BLIMP_ENGINE_TESTING_SESSION_H_
+#define BLIMP_ENGINE_TESTING_SESSION_BLIMP_ENGINE_TESTING_SESSION_H_
+
+#include "blimp/common/proto/blimp_message.pb.h"
+#include "blimp/engine/common/blimp_browser_context.h"
+#include "blimp/engine/feature/engine_settings_feature.h"
+#include "blimp/engine/session/blimp_engine_session.h"
+#include "blimp/net/blimp_message_processor.h"
+#include "content/public/browser/browser_url_handler.h"
+#include "content/public/browser/web_contents_delegate.h"
+#include "net/base/completion_callback.h"
+
+namespace blimp {
+namespace engine {
+
+class BlimpEngineTestingSession : public BlimpEngineSession {
+ public:
+ BlimpEngineTestingSession(
+ std::unique_ptr<BlimpBrowserContext> browser_context,
+ net::NetLog* net_log,
+ BlimpEngineConfig* config,
+ SettingsManager* settings_manager);
+ ~BlimpEngineTestingSession() = default;
+
+ // Override BlimpEngineSession::BlimpEngineSession
+ // This object handles NavigationMessage::LOAD_URL
+ // url rewritting with testing url handler
+ void ProcessMessage(std::unique_ptr<BlimpMessage> message,
+ const net::CompletionCallback& callback) override;
+};
+
+} // namespace engine
+} // namespace blimp
+
+#endif // BLIMP_ENGINE_TESTING_SESSION_BLIMP_ENGINE_TESTING_SESSION_H_

Powered by Google App Engine
This is Rietveld 408576698