summaryrefslogtreecommitdiffstats
path: root/blimp
diff options
context:
space:
mode:
authorkmarshall <kmarshall@chromium.org>2016-01-13 11:38:33 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-13 19:39:55 +0000
commit1ffa52f78c8d333a5e32743c2b1bc2daf1267a13 (patch)
tree3bc696ae0feca5483ed7771a217833fc6b532605 /blimp
parent3c41fe7a13fb612dbb3c80e6d3e33995049ecdc6 (diff)
downloadchromium_src-1ffa52f78c8d333a5e32743c2b1bc2daf1267a13.zip
chromium_src-1ffa52f78c8d333a5e32743c2b1bc2daf1267a13.tar.gz
chromium_src-1ffa52f78c8d333a5e32743c2b1bc2daf1267a13.tar.bz2
Blimp: add some hard-coded actions on client startup.
Doing a little bit of work on app startup reduces the need for manual intervention from the developer. BUG= R=dtrainor@chromium.org Review URL: https://codereview.chromium.org/1575493004 Cr-Commit-Position: refs/heads/master@{#369243}
Diffstat (limited to 'blimp')
-rw-r--r--blimp/client/android/java/src/org/chromium/blimp/BlimpRendererActivity.java1
-rw-r--r--blimp/client/session/blimp_client_session_android.cc8
-rw-r--r--blimp/net/blimp_message_demultiplexer.cc1
3 files changed, 10 insertions, 0 deletions
diff --git a/blimp/client/android/java/src/org/chromium/blimp/BlimpRendererActivity.java b/blimp/client/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
index 6641c39..a08407a 100644
--- a/blimp/client/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
+++ b/blimp/client/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
@@ -124,6 +124,7 @@ public class BlimpRendererActivity extends Activity implements BlimpLibraryLoade
mToolbar.initialize(mBlimpClientSession);
mTabControlFeature = new TabControlFeature(mBlimpClientSession, mBlimpView);
+ mToolbar.loadUrl("http://www.google.com/");
}
// TokenSource.Callback implementation.
diff --git a/blimp/client/session/blimp_client_session_android.cc b/blimp/client/session/blimp_client_session_android.cc
index 3a64495..ac515ee 100644
--- a/blimp/client/session/blimp_client_session_android.cc
+++ b/blimp/client/session/blimp_client_session_android.cc
@@ -4,10 +4,14 @@
#include "blimp/client/session/blimp_client_session_android.h"
+#include "blimp/client/session/tab_control_feature.h"
#include "jni/BlimpClientSession_jni.h"
namespace blimp {
namespace client {
+namespace {
+const int kDummyTabId = 0;
+} // namespace
static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
return reinterpret_cast<intptr_t>(new BlimpClientSessionAndroid(env, jobj));
@@ -31,6 +35,10 @@ BlimpClientSessionAndroid::BlimpClientSessionAndroid(
const base::android::JavaParamRef<jobject>& jobj)
: BlimpClientSession() {
java_obj_.Reset(env, jobj);
+
+ // Create a single tab's WebContents.
+ // TODO(kmarshall): Remove this once we add tab-literacy to Blimp.
+ GetTabControlFeature()->CreateTab(kDummyTabId);
}
BlimpClientSessionAndroid::~BlimpClientSessionAndroid() {}
diff --git a/blimp/net/blimp_message_demultiplexer.cc b/blimp/net/blimp_message_demultiplexer.cc
index 8c69702..eb9edff 100644
--- a/blimp/net/blimp_message_demultiplexer.cc
+++ b/blimp/net/blimp_message_demultiplexer.cc
@@ -39,6 +39,7 @@ void BlimpMessageDemultiplexer::ProcessMessage(
return;
}
+ DVLOG(2) << "Routed message " << *message << ".";
receiver_iter->second->ProcessMessage(std::move(message), callback);
}