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

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

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Created 4 years, 2 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "blimp/common/proto/blimp_message.pb.h" 14 #include "blimp/common/proto/blimp_message.pb.h"
15 #include "blimp/engine/feature/engine_render_widget_feature.h" 15 #include "blimp/engine/feature/engine_render_widget_feature.h"
16 #include "blimp/engine/feature/engine_settings_feature.h" 16 #include "blimp/engine/feature/engine_settings_feature.h"
17 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h" 17 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h"
18 #include "blimp/engine/mojo/blob_channel_service.h" 18 #include "blimp/engine/mojo/blob_channel_service.h"
19 #include "blimp/net/blimp_message_processor.h" 19 #include "blimp/net/blimp_message_processor.h"
20 #include "blimp/net/blob_channel/blob_channel_sender_impl.h" 20 #include "blimp/net/blob_channel/blob_channel_sender_impl.h"
21 #include "blimp/net/connection_error_observer.h" 21 #include "blimp/net/connection_error_observer.h"
22 #include "content/browser/renderer_host/text_input_manager.h"
EhsanK 2016/09/28 16:14:11 Whether or not exposing RWHVBase and TextInputMana
22 #include "content/public/browser/invalidate_type.h" 23 #include "content/public/browser/invalidate_type.h"
23 #include "content/public/browser/web_contents_delegate.h" 24 #include "content/public/browser/web_contents_delegate.h"
24 #include "net/base/completion_callback.h" 25 #include "net/base/completion_callback.h"
25 #include "ui/base/ime/input_method_observer.h"
26 #include "ui/gfx/geometry/size.h" 26 #include "ui/gfx/geometry/size.h"
27 27
28 namespace aura { 28 namespace aura {
29 class WindowTreeHost; 29 class WindowTreeHost;
30 30
31 namespace client { 31 namespace client {
32 class DefaultCaptureClient; 32 class DefaultCaptureClient;
33 class WindowTreeClient; 33 class WindowTreeClient;
34 } // namespace client 34 } // namespace client
35 } // namespace aura 35 } // namespace aura
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class BlimpBrowserContext; 67 class BlimpBrowserContext;
68 class BlimpEngineConfig; 68 class BlimpEngineConfig;
69 class BlimpFocusClient; 69 class BlimpFocusClient;
70 class BlimpScreen; 70 class BlimpScreen;
71 class BlimpWindowTreeHost; 71 class BlimpWindowTreeHost;
72 class EngineNetworkComponents; 72 class EngineNetworkComponents;
73 class Tab; 73 class Tab;
74 74
75 class BlimpEngineSession : public BlimpMessageProcessor, 75 class BlimpEngineSession : public BlimpMessageProcessor,
76 public content::WebContentsDelegate, 76 public content::WebContentsDelegate,
77 public ui::InputMethodObserver { 77 public content::TextInputManager::Observer {
78 public: 78 public:
79 using GetPortCallback = base::Callback<void(uint16_t)>; 79 using GetPortCallback = base::Callback<void(uint16_t)>;
80 80
81 BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context, 81 BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context,
82 net::NetLog* net_log, 82 net::NetLog* net_log,
83 BlimpEngineConfig* config, 83 BlimpEngineConfig* config,
84 SettingsManager* settings_manager); 84 SettingsManager* settings_manager);
85 ~BlimpEngineSession() override; 85 ~BlimpEngineSession() override;
86 86
87 // Starts the network stack on the IO thread, and sets default placeholder 87 // Starts the network stack on the IO thread, and sets default placeholder
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool user_gesture, 136 bool user_gesture,
137 bool last_unlocked_by_target) override; 137 bool last_unlocked_by_target) override;
138 void CloseContents(content::WebContents* source) override; 138 void CloseContents(content::WebContents* source) override;
139 void ActivateContents(content::WebContents* contents) override; 139 void ActivateContents(content::WebContents* contents) override;
140 void ForwardCompositorProto( 140 void ForwardCompositorProto(
141 content::RenderWidgetHost* render_widget_host, 141 content::RenderWidgetHost* render_widget_host,
142 const std::vector<uint8_t>& proto) override; 142 const std::vector<uint8_t>& proto) override;
143 void NavigationStateChanged(content::WebContents* source, 143 void NavigationStateChanged(content::WebContents* source,
144 content::InvalidateTypes changed_flags) override; 144 content::InvalidateTypes changed_flags) override;
145 145
146 // ui::InputMethodObserver overrides. 146 // content::TextInputManager overrides.
147 void OnTextInputTypeChanged(const ui::TextInputClient* client) override; 147 void OnUpdateTextInputStateCalled(
148 void OnFocus() override; 148 content::TextInputManager* text_input_manager,
149 void OnBlur() override; 149 content::RenderWidgetHostViewBase* updated_view,
150 void OnCaretBoundsChanged(const ui::TextInputClient* client) override; 150 bool did_update_state) override;
151 void OnTextInputStateChanged(const ui::TextInputClient* client) override;
152 void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
153 void OnShowImeIfNeeded() override;
154 151
155 // Sets up |new_contents| to be associated with the root window. 152 // Sets up |new_contents| to be associated with the root window.
156 void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents, 153 void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents,
157 const int target_tab_id); 154 const int target_tab_id);
158 155
159 // Presents the client's single screen. 156 // Presents the client's single screen.
160 // Screen should be deleted after browser context (crbug.com/613372). 157 // Screen should be deleted after browser context (crbug.com/613372).
161 std::unique_ptr<BlimpScreen> screen_; 158 std::unique_ptr<BlimpScreen> screen_;
162 159
163 // Content BrowserContext for this session. 160 // Content BrowserContext for this session.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // TODO(haibinlu): Support more than one tab (crbug/547231) 218 // TODO(haibinlu): Support more than one tab (crbug/547231)
222 std::unique_ptr<Tab> tab_; 219 std::unique_ptr<Tab> tab_;
223 220
224 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 221 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
225 }; 222 };
226 223
227 } // namespace engine 224 } // namespace engine
228 } // namespace blimp 225 } // namespace blimp
229 226
230 #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