OLD | NEW |
---|---|
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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "blimp/net/blimp_message_receiver.h" | 10 #include "blimp/net/blimp_message_processor.h" |
11 #include "content/public/browser/web_contents_delegate.h" | 11 #include "content/public/browser/web_contents_delegate.h" |
12 #include "net/base/net_errors.h" | |
Wez
2015/11/12 03:45:56
Why are you including this?
Kevin M
2015/11/12 19:03:47
Done.
| |
12 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
13 | 14 |
14 namespace aura { | 15 namespace aura { |
15 class WindowTreeHost; | 16 class WindowTreeHost; |
16 | 17 |
17 namespace client { | 18 namespace client { |
18 class DefaultCaptureClient; | 19 class DefaultCaptureClient; |
19 class WindowTreeClient; | 20 class WindowTreeClient; |
20 } // namespace client | 21 } // namespace client |
21 } // namespace aura | 22 } // namespace aura |
(...skipping 13 matching lines...) Expand all Loading... | |
35 class BlimpMessage; | 36 class BlimpMessage; |
36 | 37 |
37 namespace engine { | 38 namespace engine { |
38 | 39 |
39 class BlimpBrowserContext; | 40 class BlimpBrowserContext; |
40 class BlimpFocusClient; | 41 class BlimpFocusClient; |
41 class BlimpScreen; | 42 class BlimpScreen; |
42 class BlimpUiContextFactory; | 43 class BlimpUiContextFactory; |
43 class BlimpWindowTreeHost; | 44 class BlimpWindowTreeHost; |
44 | 45 |
45 class BlimpEngineSession : public BlimpMessageReceiver, | 46 class BlimpEngineSession : public BlimpMessageProcessor, |
46 public content::WebContentsDelegate { | 47 public content::WebContentsDelegate { |
47 public: | 48 public: |
48 explicit BlimpEngineSession(scoped_ptr<BlimpBrowserContext> browser_context); | 49 explicit BlimpEngineSession(scoped_ptr<BlimpBrowserContext> browser_context); |
49 ~BlimpEngineSession() override; | 50 ~BlimpEngineSession() override; |
50 | 51 |
51 void Initialize(); | 52 void Initialize(); |
52 | 53 |
53 BlimpBrowserContext* browser_context() { return browser_context_.get(); } | 54 BlimpBrowserContext* browser_context() { return browser_context_.get(); } |
54 | 55 |
55 // BlimpMessageReceiver implementation. | 56 // BlimpMessageProcessor implementation. |
56 // TODO(haibinlu): Remove this in favor of the BlimpMessageDispatcher. | 57 // TODO(haibinlu): Delete this and move to BlimpMessageDemultiplexer. |
57 net::Error OnBlimpMessage(const BlimpMessage& message) override; | 58 void ProcessMessage(const BlimpMessage& message, |
59 const net::CompletionCallback& callback) override; | |
Wez
2015/11/12 03:45:56
include net/completion_callback for this, or forwa
Kevin M
2015/11/12 19:03:47
Done.
| |
58 | 60 |
59 private: | 61 private: |
60 // Creates a new WebContents, which will be indexed by |target_tab_id|. | 62 // Creates a new WebContents, which will be indexed by |target_tab_id|. |
61 void CreateWebContents(const int target_tab_id); | 63 void CreateWebContents(const int target_tab_id); |
62 | 64 |
63 // Navigates the target tab to the |url|. | 65 // Navigates the target tab to the |url|. |
64 void LoadUrl(const int target_tab_id, const GURL& url); | 66 void LoadUrl(const int target_tab_id, const GURL& url); |
65 | 67 |
66 // content::WebContentsDelegate implementation. | 68 // content::WebContentsDelegate implementation. |
67 content::WebContents* OpenURLFromTab( | 69 content::WebContents* OpenURLFromTab( |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 // Currently attached client connection. | 107 // Currently attached client connection. |
106 scoped_ptr<BlimpConnection> client_connection_; | 108 scoped_ptr<BlimpConnection> client_connection_; |
107 | 109 |
108 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 110 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); |
109 }; | 111 }; |
110 | 112 |
111 } // namespace engine | 113 } // namespace engine |
112 } // namespace blimp | 114 } // namespace blimp |
113 | 115 |
114 #endif // BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_ | 116 #endif // BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_ |
OLD | NEW |