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

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

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Created 4 years, 12 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_BROWSER_BLIMP_ENGINE_SESSION_H_ 5 #ifndef BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_
6 #define BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_ 6 #define BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_
7 7
8 #include <vector>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 #include "blimp/engine/browser/engine_render_widget_message_processor.h" 12 #include "blimp/engine/browser/engine_render_widget_message_processor.h"
11 #include "blimp/net/blimp_message_processor.h" 13 #include "blimp/net/blimp_message_processor.h"
12 #include "content/public/browser/invalidate_type.h" 14 #include "content/public/browser/invalidate_type.h"
13 #include "content/public/browser/web_contents_delegate.h" 15 #include "content/public/browser/web_contents_delegate.h"
14 #include "content/public/browser/web_contents_observer.h" 16 #include "content/public/browser/web_contents_observer.h"
15 #include "net/base/completion_callback.h" 17 #include "net/base/completion_callback.h"
16 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
17 19
(...skipping 21 matching lines...) Expand all
39 } 41 }
40 42
41 namespace wm { 43 namespace wm {
42 class FocusController; 44 class FocusController;
43 } 45 }
44 46
45 namespace blimp { 47 namespace blimp {
46 48
47 class BlimpConnection; 49 class BlimpConnection;
48 class BlimpMessage; 50 class BlimpMessage;
51 class BrowserConnectionHandler;
52 class EngineAuthenticationHandler;
53 class EngineConnectionManager;
49 54
50 namespace engine { 55 namespace engine {
51 56
52 class BlimpBrowserContext; 57 class BlimpBrowserContext;
53 class BlimpFocusClient; 58 class BlimpFocusClient;
54 class BlimpNetworkComponents; 59 class BlimpNetworkComponents;
55 class BlimpScreen; 60 class BlimpScreen;
56 class BlimpUiContextFactory; 61 class BlimpUiContextFactory;
57 class BlimpWindowTreeHost; 62 class BlimpWindowTreeHost;
58 63
(...skipping 13 matching lines...) Expand all
72 void Initialize(); 77 void Initialize();
73 78
74 BlimpBrowserContext* browser_context() { return browser_context_.get(); } 79 BlimpBrowserContext* browser_context() { return browser_context_.get(); }
75 80
76 // BlimpMessageProcessor implementation. 81 // BlimpMessageProcessor implementation.
77 // TODO(haibinlu): Delete this and move to BlimpMessageDemultiplexer. 82 // TODO(haibinlu): Delete this and move to BlimpMessageDemultiplexer.
78 void ProcessMessage(scoped_ptr<BlimpMessage> message, 83 void ProcessMessage(scoped_ptr<BlimpMessage> message,
79 const net::CompletionCallback& callback) override; 84 const net::CompletionCallback& callback) override;
80 85
81 private: 86 private:
87 // Initializes the engine's network objects. Must be called on the IO thread.
88 void InitializeNetwork();
89
82 // TabControlMessage handler methods. 90 // TabControlMessage handler methods.
83 // Creates a new WebContents, which will be indexed by |target_tab_id|. 91 // Creates a new WebContents, which will be indexed by |target_tab_id|.
84 void CreateWebContents(const int target_tab_id); 92 void CreateWebContents(const int target_tab_id);
85 void CloseWebContents(const int target_tab_id); 93 void CloseWebContents(const int target_tab_id);
86 void HandleResize(float device_pixel_ratio, const gfx::Size& size); 94 void HandleResize(float device_pixel_ratio, const gfx::Size& size);
87 95
88 // NavigationMessage handler methods. 96 // NavigationMessage handler methods.
89 // Navigates the target tab to the |url|. 97 // Navigates the target tab to the |url|.
90 void LoadUrl(const int target_tab_id, const GURL& url); 98 void LoadUrl(const int target_tab_id, const GURL& url);
91 void GoBack(const int target_tab_id); 99 void GoBack(const int target_tab_id);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; 151 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
144 152
145 // Only one web_contents is supported for blimp 0.5 153 // Only one web_contents is supported for blimp 0.5
146 scoped_ptr<content::WebContents> web_contents_; 154 scoped_ptr<content::WebContents> web_contents_;
147 155
148 // The bridge to the network layer that does the RenderWidget proto/id work. 156 // The bridge to the network layer that does the RenderWidget proto/id work.
149 // TODO(dtrainor, haibinlu): Move this to a higher level once we start dealing 157 // TODO(dtrainor, haibinlu): Move this to a higher level once we start dealing
150 // with multiple tabs. 158 // with multiple tabs.
151 EngineRenderWidgetMessageProcessor render_widget_processor_; 159 EngineRenderWidgetMessageProcessor render_widget_processor_;
152 160
153 // Container for connection manager, authentication handler, and 161 // Objects for establishing and managing network connections.
154 // browser connection handler. The components run on the I/O thread, and 162 // May only be accessed on the IO thread.
155 // this object is destroyed there. 163 net::NetLog* net_log_;
156 scoped_ptr<BlimpNetworkComponents> net_components_; 164 scoped_ptr<BrowserConnectionHandler> connection_handler_;
165 scoped_ptr<EngineAuthenticationHandler> authentication_handler_;
166 scoped_ptr<EngineConnectionManager> connection_manager_;
157 167
158 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 168 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
159 }; 169 };
160 170
161 } // namespace engine 171 } // namespace engine
162 } // namespace blimp 172 } // namespace blimp
163 173
164 #endif // BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_ 174 #endif // BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698