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

Unified Diff: blimp/client/session/blimp_client_session_android.cc

Issue 1575493004: Blimp: add some hard-coded actions on client startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | blimp/net/blimp_message_demultiplexer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/session/blimp_client_session_android.cc
diff --git a/blimp/client/session/blimp_client_session_android.cc b/blimp/client/session/blimp_client_session_android.cc
index a33e54af8aee2eeed7a2b7ca4368b66817fc0756..9425c8685cd2ae486c7c94beae5d6b282afbed8d 100644
--- a/blimp/client/session/blimp_client_session_android.cc
+++ b/blimp/client/session/blimp_client_session_android.cc
@@ -4,9 +4,20 @@
#include "blimp/client/session/blimp_client_session_android.h"
+#include "blimp/client/session/navigation_feature.h"
+#include "blimp/client/session/tab_control_feature.h"
+#include "blimp/net/input_message_generator.h"
#include "jni/BlimpClientSession_jni.h"
namespace blimp {
+namespace {
+
+// TODO(kmarshall): Replace with homepage URL from profile, config, etc.
+const char kInitialUrl[] = "http://www.google.com/";
+
+const int kDummyTabId = 0;
+
+} // namespace
static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
return reinterpret_cast<intptr_t>(new BlimpClientSessionAndroid(env, jobj));
@@ -30,6 +41,13 @@ BlimpClientSessionAndroid::BlimpClientSessionAndroid(
const base::android::JavaParamRef<jobject>& jobj)
: BlimpClientSession() {
java_obj_.Reset(env, jobj);
+
+ // Prototype hard-coded hack messages, to be sent immediately after a
+ // connection is established on first run.
+ // TODO(dtrainor): Remove this when we are reading homepages and persisted
+ // tab data from a user profile.
+ GetTabControlFeature()->CreateTab(kDummyTabId);
David Trainor- moved to gerrit 2016/01/11 17:46:09 Right after the following line in BlimpRendererAct
Kevin M 2016/01/12 01:41:07 Done, though I kept the CreateTab() call. I think
+ GetNavigationFeature()->NavigateToUrlText(kDummyTabId, kInitialUrl);
}
BlimpClientSessionAndroid::~BlimpClientSessionAndroid() {}
« no previous file with comments | « no previous file | blimp/net/blimp_message_demultiplexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698