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

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

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Addressed haibin's feedback, made an ObserverList for ConnectionErrorObserver Created 5 years 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/browser/blimp_engine_session.cc
diff --git a/blimp/engine/browser/blimp_engine_session.cc b/blimp/engine/browser/blimp_engine_session.cc
index 412740c5d4c1f11618e2770b48dc5e8cd6849b2a..9d4de23b75aafc45fbc5e16180ffc78d08a74dc9 100644
--- a/blimp/engine/browser/blimp_engine_session.cc
+++ b/blimp/engine/browser/blimp_engine_session.cc
@@ -14,6 +14,7 @@
#include "blimp/net/blimp_connection.h"
#include "blimp/net/blimp_message_multiplexer.h"
#include "blimp/net/browser_connection_handler.h"
+#include "blimp/net/common.h"
#include "blimp/net/engine_authentication_handler.h"
#include "blimp/net/engine_connection_manager.h"
#include "blimp/net/null_blimp_message_processor.h"
@@ -67,10 +68,10 @@ class FocusRulesImpl : public wm::BaseFocusRules {
// This class's functions and destruction are all invoked on the IO thread by
// the BlimpEngineSession.
-class BlimpNetworkComponents {
+class EngineNetworkComponents {
public:
- explicit BlimpNetworkComponents(net::NetLog* net_log);
- ~BlimpNetworkComponents();
+ explicit EngineNetworkComponents(net::NetLog* net_log);
+ ~EngineNetworkComponents();
void Initialize();
@@ -80,17 +81,17 @@ class BlimpNetworkComponents {
scoped_ptr<EngineAuthenticationHandler> authentication_handler_;
scoped_ptr<EngineConnectionManager> connection_manager_;
- DISALLOW_COPY_AND_ASSIGN(BlimpNetworkComponents);
+ DISALLOW_COPY_AND_ASSIGN(EngineNetworkComponents);
};
-BlimpNetworkComponents::BlimpNetworkComponents(net::NetLog* net_log)
+EngineNetworkComponents::EngineNetworkComponents(net::NetLog* net_log)
: net_log_(net_log) {}
-BlimpNetworkComponents::~BlimpNetworkComponents() {
+EngineNetworkComponents::~EngineNetworkComponents() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
-void BlimpNetworkComponents::Initialize() {
+void EngineNetworkComponents::Initialize() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK(!connection_handler_);
@@ -117,7 +118,7 @@ BlimpEngineSession::BlimpEngineSession(
net::NetLog* net_log)
: browser_context_(std::move(browser_context)),
screen_(new BlimpScreen),
- net_components_(new BlimpNetworkComponents(net_log)) {
+ net_components_(new EngineNetworkComponents(net_log)) {
screen_->UpdateDisplayScaleAndSize(kDefaultScaleFactor,
gfx::Size(kDefaultDisplayWidth,
kDefaultDisplayHeight));
@@ -164,11 +165,10 @@ void BlimpEngineSession::Initialize() {
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
- base::Bind(&BlimpNetworkComponents::Initialize,
+ base::Bind(&EngineNetworkComponents::Initialize,
base::Unretained(net_components_.get())));
// Registers features.
- // TODO(kmarshall) Refactor this using
// 1. Get outgoing message processors for blimp message types of a feature.
haibinlu 2016/01/04 19:45:45 remove the comment here since TODO is removed.
Kevin M 2016/01/04 20:42:12 Done.
// 2. Create a feature with these outgoing message processors.
// 3. Register the feature as the incoming message processor for these

Powered by Google App Engine
This is Rietveld 408576698