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

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

Issue 1779673003: Added network components for blimp text input feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.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/net/blimp_message_processor.h" 16 #include "blimp/net/blimp_message_processor.h"
17 #include "blimp/net/connection_error_observer.h" 17 #include "blimp/net/connection_error_observer.h"
18 #include "content/public/browser/invalidate_type.h" 18 #include "content/public/browser/invalidate_type.h"
19 #include "content/public/browser/web_contents_delegate.h" 19 #include "content/public/browser/web_contents_delegate.h"
20 #include "content/public/browser/web_contents_observer.h" 20 #include "content/public/browser/web_contents_observer.h"
21 #include "net/base/completion_callback.h" 21 #include "net/base/completion_callback.h"
22 #include "ui/base/ime/input_method_observer.h"
22 #include "ui/gfx/geometry/size.h" 23 #include "ui/gfx/geometry/size.h"
23 24
24 namespace aura { 25 namespace aura {
25 class WindowTreeHost; 26 class WindowTreeHost;
26 27
27 namespace client { 28 namespace client {
28 class DefaultCaptureClient; 29 class DefaultCaptureClient;
29 class WindowTreeClient; 30 class WindowTreeClient;
30 } // namespace client 31 } // namespace client
31 } // namespace aura 32 } // namespace aura
(...skipping 30 matching lines...) Expand all
62 class BlimpFocusClient; 63 class BlimpFocusClient;
63 class BlimpScreen; 64 class BlimpScreen;
64 class BlimpUiContextFactory; 65 class BlimpUiContextFactory;
65 class BlimpWindowTreeHost; 66 class BlimpWindowTreeHost;
66 class EngineNetworkComponents; 67 class EngineNetworkComponents;
67 68
68 class BlimpEngineSession 69 class BlimpEngineSession
69 : public BlimpMessageProcessor, 70 : public BlimpMessageProcessor,
70 public content::WebContentsDelegate, 71 public content::WebContentsDelegate,
71 public content::WebContentsObserver, 72 public content::WebContentsObserver,
73 public ui::InputMethodObserver,
72 public EngineRenderWidgetFeature::RenderWidgetMessageDelegate { 74 public EngineRenderWidgetFeature::RenderWidgetMessageDelegate {
73 public: 75 public:
74 BlimpEngineSession(scoped_ptr<BlimpBrowserContext> browser_context, 76 BlimpEngineSession(scoped_ptr<BlimpBrowserContext> browser_context,
75 net::NetLog* net_log, 77 net::NetLog* net_log,
76 BlimpEngineConfig* config); 78 BlimpEngineConfig* config);
77 ~BlimpEngineSession() override; 79 ~BlimpEngineSession() override;
78 80
79 // Starts the network stack on the IO thread, and sets default placeholder 81 // Starts the network stack on the IO thread, and sets default placeholder
80 // values for e.g. screen size pending real values being supplied by the 82 // values for e.g. screen size pending real values being supplied by the
81 // client. 83 // client.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool user_gesture, 132 bool user_gesture,
131 bool last_unlocked_by_target) override; 133 bool last_unlocked_by_target) override;
132 void CloseContents(content::WebContents* source) override; 134 void CloseContents(content::WebContents* source) override;
133 void ActivateContents(content::WebContents* contents) override; 135 void ActivateContents(content::WebContents* contents) override;
134 void ForwardCompositorProto( 136 void ForwardCompositorProto(
135 content::RenderWidgetHost* render_widget_host, 137 content::RenderWidgetHost* render_widget_host,
136 const std::vector<uint8_t>& proto) override; 138 const std::vector<uint8_t>& proto) override;
137 void NavigationStateChanged(content::WebContents* source, 139 void NavigationStateChanged(content::WebContents* source,
138 content::InvalidateTypes changed_flags) override; 140 content::InvalidateTypes changed_flags) override;
139 141
142 // ui::InputMethodObserver overrides.
nyquist 2016/03/10 00:57:13 Could this either move to the EngineRenderWidgetFe
143 void OnTextInputTypeChanged(const ui::TextInputClient* client) override;
144 void OnFocus() override;
145 void OnBlur() override;
146 void OnCaretBoundsChanged(const ui::TextInputClient* client) override;
147 void OnTextInputStateChanged(const ui::TextInputClient* client) override;
148 void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
149 void OnShowImeIfNeeded() override;
150
151 // Used to show/hide IME when user selects text input.
152 void ShowIme(bool show);
nyquist 2016/03/10 00:57:13 Can this be private?
153
140 // content::WebContentsObserver implementation. 154 // content::WebContentsObserver implementation.
141 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 155 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
142 void RenderViewHostChanged(content::RenderViewHost* old_host, 156 void RenderViewHostChanged(content::RenderViewHost* old_host,
143 content::RenderViewHost* new_host) override; 157 content::RenderViewHost* new_host) override;
144 void RenderViewDeleted(content::RenderViewHost* render_view_host) override; 158 void RenderViewDeleted(content::RenderViewHost* render_view_host) override;
145 159
146 // Sets up and owns |new_contents|. 160 // Sets up and owns |new_contents|.
147 void PlatformSetContents(scoped_ptr<content::WebContents> new_contents); 161 void PlatformSetContents(scoped_ptr<content::WebContents> new_contents);
148 162
149 // Content BrowserContext for this session. 163 // Content BrowserContext for this session.
(...skipping 29 matching lines...) Expand all
179 // Container for connection manager, authentication handler, and 193 // Container for connection manager, authentication handler, and
180 // browser connection handler. The components run on the I/O thread, and 194 // browser connection handler. The components run on the I/O thread, and
181 // this object is destroyed there. 195 // this object is destroyed there.
182 scoped_ptr<EngineNetworkComponents> net_components_; 196 scoped_ptr<EngineNetworkComponents> net_components_;
183 197
184 scoped_ptr<ThreadPipeManager> thread_pipe_manager_; 198 scoped_ptr<ThreadPipeManager> thread_pipe_manager_;
185 199
186 // Used to send TAB_CONTROL or NAVIGATION messages to client. 200 // Used to send TAB_CONTROL or NAVIGATION messages to client.
187 scoped_ptr<BlimpMessageProcessor> tab_control_message_sender_; 201 scoped_ptr<BlimpMessageProcessor> tab_control_message_sender_;
188 scoped_ptr<BlimpMessageProcessor> navigation_message_sender_; 202 scoped_ptr<BlimpMessageProcessor> navigation_message_sender_;
203 scoped_ptr<BlimpMessageProcessor> ime_message_sender_;
189 204
190 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 205 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
191 }; 206 };
192 207
193 } // namespace engine 208 } // namespace engine
194 } // namespace blimp 209 } // namespace blimp
195 210
196 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 211 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698