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

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

Issue 2035543002: [Blimp] Creates engine tab class to handle tab related operations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addresses comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: blimp/engine/session/blimp_engine_session.h
diff --git a/blimp/engine/session/blimp_engine_session.h b/blimp/engine/session/blimp_engine_session.h
index 2c064e59f7c8cac8b771e888c1483a01dd5b74f8..53effe55fa43a40e4e0cf027432af9720f14fbc1 100644
--- a/blimp/engine/session/blimp_engine_session.h
+++ b/blimp/engine/session/blimp_engine_session.h
@@ -14,12 +14,10 @@
#include "blimp/common/proto/blimp_message.pb.h"
#include "blimp/engine/feature/engine_render_widget_feature.h"
#include "blimp/engine/feature/engine_settings_feature.h"
-#include "blimp/engine/session/page_load_tracker.h"
#include "blimp/net/blimp_message_processor.h"
#include "blimp/net/connection_error_observer.h"
#include "content/public/browser/invalidate_type.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/base/ime/input_method_observer.h"
#include "ui/gfx/geometry/size.h"
@@ -67,14 +65,13 @@ class BlimpFocusClient;
class BlimpScreen;
class BlimpWindowTreeHost;
class EngineNetworkComponents;
+class TabBlimp;
class BlimpEngineSession
: public BlimpMessageProcessor,
public content::WebContentsDelegate,
- public content::WebContentsObserver,
public ui::InputMethodObserver,
- public EngineRenderWidgetFeature::RenderWidgetMessageDelegate,
- public PageLoadTrackerClient {
+ public EngineRenderWidgetFeature::RenderWidgetMessageDelegate {
public:
using GetPortCallback = base::Callback<void(uint16_t)>;
@@ -105,11 +102,11 @@ class BlimpEngineSession
void RegisterFeatures();
// TabControlMessage handler methods.
- // Creates a new WebContents, which will be indexed by |target_tab_id|.
- // Returns true if a new WebContents is created, false otherwise.
- bool CreateWebContents(const int target_tab_id);
+ // Creates a new tab, which will be indexed by |target_tab_id|.
+ // Returns true if a new tab is created, false otherwise.
+ bool CreateTab(const int target_tab_id);
- void CloseWebContents(const int target_tab_id);
+ void CloseTab(const int target_tab_id);
Kevin M 2016/06/02 21:54:05 Comment?
haibinlu 2016/06/02 23:24:33 Done.
void HandleResize(float device_pixel_ratio, const gfx::Size& size);
Kevin M 2016/06/02 21:54:05 Comment?
haibinlu 2016/06/02 23:24:33 Done.
// NavigationMessage handler methods.
@@ -158,17 +155,9 @@ class BlimpEngineSession
void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
void OnShowImeIfNeeded() override;
- // content::WebContentsObserver implementation.
- void RenderViewCreated(content::RenderViewHost* render_view_host) override;
- void RenderViewHostChanged(content::RenderViewHost* old_host,
- content::RenderViewHost* new_host) override;
- void RenderViewDeleted(content::RenderViewHost* render_view_host) override;
-
- // PageLoadTrackerClient implementation.
- void SendPageLoadStatusUpdate(PageLoadStatus load_status) override;
-
// Sets up and owns |new_contents|.
- void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents);
+ void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents,
+ const int target_tab_id);
// Presents the client's single screen.
// Screen should be deleted after browser context (crbug.com/613372).
@@ -194,13 +183,6 @@ class BlimpEngineSession
// Used to attach null-parented windows (e.g. popups) to the root window.
std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_;
- // Only one web_contents is supported for blimp 0.5
- std::unique_ptr<content::WebContents> web_contents_;
-
- // Tracks the page load status for a tab. Each PageLoadTracker is tied to a
- // WebContents.
- std::unique_ptr<PageLoadTracker> page_load_tracker_;
-
// Manages all global settings for the engine session.
SettingsManager* settings_manager_;
@@ -222,6 +204,9 @@ class BlimpEngineSession
std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_;
std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_;
+ // Only one tab is supported for blimp 0.5.
+ std::unique_ptr<TabBlimp> tab_;
+
DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
};

Powered by Google App Engine
This is Rietveld 408576698