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

Unified Diff: blimp/engine/browser/blimp_engine_session.h

Issue 1450423002: Add glue between the client and engine for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blimp_ipc2
Patch Set: Fix build break Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/engine/browser/BUILD.gn ('k') | blimp/engine/browser/blimp_engine_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4bba48762b3bc308a6e77462c9552be1e6c7252a 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/engine_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 EngineRenderWidgetMessageProcessor::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.
+ EngineRenderWidgetMessageProcessor render_widget_processor_;
+
DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
};
« no previous file with comments | « blimp/engine/browser/BUILD.gn ('k') | blimp/engine/browser/blimp_engine_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698