| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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   void LoadProgressChanged(content::WebContents* source, | 141   void LoadProgressChanged(content::WebContents* source, | 
| 140                            double progress) override; | 142                            double progress) override; | 
| 141 | 143 | 
|  | 144   // ui::InputMethodObserver overrides. | 
|  | 145   void OnTextInputTypeChanged(const ui::TextInputClient* client) override; | 
|  | 146   void OnFocus() override; | 
|  | 147   void OnBlur() override; | 
|  | 148   void OnCaretBoundsChanged(const ui::TextInputClient* client) override; | 
|  | 149   void OnTextInputStateChanged(const ui::TextInputClient* client) override; | 
|  | 150   void OnInputMethodDestroyed(const ui::InputMethod* input_method) override; | 
|  | 151   void OnShowImeIfNeeded() override; | 
|  | 152 | 
| 142   // content::WebContentsObserver implementation. | 153   // content::WebContentsObserver implementation. | 
| 143   void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 154   void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 
| 144   void RenderViewHostChanged(content::RenderViewHost* old_host, | 155   void RenderViewHostChanged(content::RenderViewHost* old_host, | 
| 145                              content::RenderViewHost* new_host) override; | 156                              content::RenderViewHost* new_host) override; | 
| 146   void RenderViewDeleted(content::RenderViewHost* render_view_host) override; | 157   void RenderViewDeleted(content::RenderViewHost* render_view_host) override; | 
| 147 | 158 | 
| 148   // Sets up and owns |new_contents|. | 159   // Sets up and owns |new_contents|. | 
| 149   void PlatformSetContents(scoped_ptr<content::WebContents> new_contents); | 160   void PlatformSetContents(scoped_ptr<content::WebContents> new_contents); | 
| 150 | 161 | 
| 151   // Stores the value of the last page load completed update sent to the client. | 162   // Stores the value of the last page load completed update sent to the client. | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 193   scoped_ptr<BlimpMessageProcessor> tab_control_message_sender_; | 204   scoped_ptr<BlimpMessageProcessor> tab_control_message_sender_; | 
| 194   scoped_ptr<BlimpMessageProcessor> navigation_message_sender_; | 205   scoped_ptr<BlimpMessageProcessor> navigation_message_sender_; | 
| 195 | 206 | 
| 196   DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 207   DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); | 
| 197 }; | 208 }; | 
| 198 | 209 | 
| 199 }  // namespace engine | 210 }  // namespace engine | 
| 200 }  // namespace blimp | 211 }  // namespace blimp | 
| 201 | 212 | 
| 202 #endif  // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 213 #endif  // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ | 
| OLD | NEW | 
|---|