diff options
author | kmarshall <kmarshall@chromium.org> | 2016-01-13 11:38:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-13 19:39:55 +0000 |
commit | 1ffa52f78c8d333a5e32743c2b1bc2daf1267a13 (patch) | |
tree | 3bc696ae0feca5483ed7771a217833fc6b532605 | |
parent | 3c41fe7a13fb612dbb3c80e6d3e33995049ecdc6 (diff) | |
download | chromium_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}
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); } |