| Index: blimp/engine/browser/blimp_engine_session.h
|
| diff --git a/blimp/engine/browser/blimp_engine_session.h b/blimp/engine/browser/blimp_engine_session.h
|
| index 6b117a9722368f0dc3b7c920033313d5d1629d1d..dc18486cfff2ae937aacc8610ea6caa9661317f1 100644
|
| --- a/blimp/engine/browser/blimp_engine_session.h
|
| +++ b/blimp/engine/browser/blimp_engine_session.h
|
| @@ -7,8 +7,10 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "blimp/engine/browser/host_render_widget_message_processor.h"
|
| #include "blimp/net/blimp_message_processor.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| +#include "content/public/browser/web_contents_observer.h"
|
| #include "net/base/completion_callback.h"
|
| #include "ui/gfx/geometry/size.h"
|
|
|
| @@ -23,9 +25,14 @@ class WindowTreeClient;
|
|
|
| namespace content {
|
| class BrowserContext;
|
| +class RenderViewHost;
|
| class WebContents;
|
| }
|
|
|
| +namespace gfx {
|
| +class Size;
|
| +}
|
| +
|
| namespace wm {
|
| class FocusController;
|
| }
|
| @@ -43,8 +50,11 @@ class BlimpScreen;
|
| class BlimpUiContextFactory;
|
| class BlimpWindowTreeHost;
|
|
|
| -class BlimpEngineSession : public BlimpMessageProcessor,
|
| - public content::WebContentsDelegate {
|
| +class BlimpEngineSession
|
| + : public BlimpMessageProcessor,
|
| + public content::WebContentsDelegate,
|
| + public content::WebContentsObserver,
|
| + public HostRenderWidgetMessageProcessor::RenderWidgetMessageDelegate {
|
| public:
|
| explicit BlimpEngineSession(scoped_ptr<BlimpBrowserContext> browser_context);
|
| ~BlimpEngineSession() override;
|
| @@ -63,6 +73,7 @@ class BlimpEngineSession : public BlimpMessageProcessor,
|
| // Creates a new WebContents, which will be indexed by |target_tab_id|.
|
| void CreateWebContents(const int target_tab_id);
|
| void CloseWebContents(const int target_tab_id);
|
| + void HandleResize(const gfx::Size& size);
|
|
|
| // NavigationMessage handler methods.
|
| // Navigates the target tab to the |url|.
|
| @@ -71,6 +82,12 @@ class BlimpEngineSession : public BlimpMessageProcessor,
|
| void GoForward(const int target_tab_id);
|
| void Reload(const int target_tab_id);
|
|
|
| + // RenderWidgetMessage handler methods.
|
| + // RenderWidgetMessageDelegate implementation.
|
| + void OnWebInputEvent(scoped_ptr<blink::WebInputEvent> event) override;
|
| + void OnCompositorMessageReceived(
|
| + const std::vector<uint8_t>& message) override;
|
| +
|
| // content::WebContentsDelegate implementation.
|
| content::WebContents* OpenURLFromTab(
|
| content::WebContents* source,
|
| @@ -88,6 +105,10 @@ class BlimpEngineSession : public BlimpMessageProcessor,
|
| void ActivateContents(content::WebContents* contents) override;
|
| void ForwardCompositorProto(const std::vector<uint8_t>& proto) override;
|
|
|
| + // content::WebContentsObserver implementation.
|
| + void RenderViewHostChanged(content::RenderViewHost* old_host,
|
| + content::RenderViewHost* new_host) override;
|
| +
|
| // Sets up and owns |new_contents|.
|
| void PlatformSetContents(scoped_ptr<content::WebContents> new_contents);
|
|
|
| @@ -114,6 +135,11 @@ class BlimpEngineSession : public BlimpMessageProcessor,
|
| // Currently attached client connection.
|
| scoped_ptr<BlimpConnection> client_connection_;
|
|
|
| + // The bridge to the network layer that does the RenderWidget proto/id work.
|
| + // TODO(dtrainor, haibinlu): Move this to a higher level once we start dealing
|
| + // with multiple tabs.
|
| + HostRenderWidgetMessageProcessor render_widget_processor_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
|
| };
|
|
|
|
|