| 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_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  Loading... | 
| 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  Loading... | 
| 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. | 
|  | 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 | 
| 140   // content::WebContentsObserver implementation. | 151   // content::WebContentsObserver implementation. | 
| 141   void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 152   void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 
| 142   void RenderViewHostChanged(content::RenderViewHost* old_host, | 153   void RenderViewHostChanged(content::RenderViewHost* old_host, | 
| 143                              content::RenderViewHost* new_host) override; | 154                              content::RenderViewHost* new_host) override; | 
| 144   void RenderViewDeleted(content::RenderViewHost* render_view_host) override; | 155   void RenderViewDeleted(content::RenderViewHost* render_view_host) override; | 
| 145 | 156 | 
| 146   // Sets up and owns |new_contents|. | 157   // Sets up and owns |new_contents|. | 
| 147   void PlatformSetContents(scoped_ptr<content::WebContents> new_contents); | 158   void PlatformSetContents(scoped_ptr<content::WebContents> new_contents); | 
| 148 | 159 | 
| 149   // Content BrowserContext for this session. | 160   // Content BrowserContext for this session. | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 187   scoped_ptr<BlimpMessageProcessor> tab_control_message_sender_; | 198   scoped_ptr<BlimpMessageProcessor> tab_control_message_sender_; | 
| 188   scoped_ptr<BlimpMessageProcessor> navigation_message_sender_; | 199   scoped_ptr<BlimpMessageProcessor> navigation_message_sender_; | 
| 189 | 200 | 
| 190   DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 201   DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 
| 191 }; | 202 }; | 
| 192 | 203 | 
| 193 }  // namespace engine | 204 }  // namespace engine | 
| 194 }  // namespace blimp | 205 }  // namespace blimp | 
| 195 | 206 | 
| 196 #endif  // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 207 #endif  // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 
| OLD | NEW | 
|---|