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

Side by Side Diff: blimp/engine/session/blimp_engine_session.h

Issue 1929723002: [Blimp] Adds blimp engine browser test framework and LoadUrl test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update gn and deps Created 4 years, 7 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 5 #ifndef BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
6 #define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 6 #define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 namespace engine { 61 namespace engine {
62 62
63 class BlimpBrowserContext; 63 class BlimpBrowserContext;
64 class BlimpEngineConfig; 64 class BlimpEngineConfig;
65 class BlimpFocusClient; 65 class BlimpFocusClient;
66 class BlimpScreen; 66 class BlimpScreen;
67 class BlimpWindowTreeHost; 67 class BlimpWindowTreeHost;
68 class EngineNetworkComponents; 68 class EngineNetworkComponents;
69 69
70 using GetPortCallback = base::Callback<void(uint16_t)>;
71
70 class BlimpEngineSession 72 class BlimpEngineSession
71 : public BlimpMessageProcessor, 73 : public BlimpMessageProcessor,
72 public content::WebContentsDelegate, 74 public content::WebContentsDelegate,
73 public content::WebContentsObserver, 75 public content::WebContentsObserver,
74 public ui::InputMethodObserver, 76 public ui::InputMethodObserver,
75 public EngineRenderWidgetFeature::RenderWidgetMessageDelegate { 77 public EngineRenderWidgetFeature::RenderWidgetMessageDelegate {
76 public: 78 public:
77 BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context, 79 BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context,
78 net::NetLog* net_log, 80 net::NetLog* net_log,
79 BlimpEngineConfig* config, 81 BlimpEngineConfig* config,
80 SettingsManager* settings_manager); 82 SettingsManager* settings_manager);
81 ~BlimpEngineSession() override; 83 ~BlimpEngineSession() override;
82 84
83 // Starts the network stack on the IO thread, and sets default placeholder 85 // Starts the network stack on the IO thread, and sets default placeholder
84 // values for e.g. screen size pending real values being supplied by the 86 // values for e.g. screen size pending real values being supplied by the
85 // client. 87 // client.
86 void Initialize(); 88 void Initialize();
87 89
88 BlimpBrowserContext* browser_context() { return browser_context_.get(); } 90 BlimpBrowserContext* browser_context() { return browser_context_.get(); }
89 91
92 // Gets Engine's listening port. Invokes callback with the allocated port.
93 void GetEnginePortForTesting(const GetPortCallback& callback);
94
90 // BlimpMessageProcessor implementation. 95 // BlimpMessageProcessor implementation.
91 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly. 96 // This object handles incoming TAB_CONTROL and NAVIGATION messages directly.
92 void ProcessMessage(std::unique_ptr<BlimpMessage> message, 97 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
93 const net::CompletionCallback& callback) override; 98 const net::CompletionCallback& callback) override;
94 99
95 private: 100 private:
96 // Creates ThreadPipeManager, registers features, and then starts to accept 101 // Creates ThreadPipeManager, registers features, and then starts to accept
97 // incoming connection. 102 // incoming connection.
98 void RegisterFeatures(); 103 void RegisterFeatures();
99 104
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; 218 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_;
214 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; 219 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_;
215 220
216 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 221 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
217 }; 222 };
218 223
219 } // namespace engine 224 } // namespace engine
220 } // namespace blimp 225 } // namespace blimp
221 226
222 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 227 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698