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

Unified Diff: sky/shell/android/org/domokit/sky/shell/SkyActivity.java

Issue 1176373004: Wire up Android back button in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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: sky/shell/android/org/domokit/sky/shell/SkyActivity.java
diff --git a/sky/shell/android/org/domokit/sky/shell/SkyActivity.java b/sky/shell/android/org/domokit/sky/shell/SkyActivity.java
index 99af729c85b0d4f153e9023ca9287700dd3e3077..2cbcccb49f6f60ad5afafb1b33e2418996b54723 100644
--- a/sky/shell/android/org/domokit/sky/shell/SkyActivity.java
+++ b/sky/shell/android/org/domokit/sky/shell/SkyActivity.java
@@ -48,6 +48,17 @@ public class SkyActivity extends Activity {
super.onDestroy();
}
+ @Override
+ public void onBackPressed() {
+ if (mView != null) {
+ mView.onBackPressed();
+ // TODO(abarth): We should have some way to trigger the default
+ // back behavior.
+ return;
+ }
+ super.onBackPressed();
+ }
+
public void loadUrl(String url) {
mView.loadUrl(url);
}
« no previous file with comments | « sky/shell/android/org/domokit/sky/shell/PlatformViewAndroid.java ('k') | sky/shell/ui/input_event_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698