Back button should be able to close apps (issue 155)

R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1213623008.
This commit is contained in:
Collin Jackson
2015-07-06 18:01:04 -07:00
parent 869b97cc91
commit 11e887026f
3 changed files with 14 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ if (is_android) {
"//services/keyboard",
"//sky/services/engine:engine_java",
"//sky/services/oknet",
"//sky/services/intents:intents_lib",
]
}

View File

@@ -12,6 +12,8 @@ import android.view.WindowManager;
import org.chromium.base.PathUtils;
import org.domokit.intents.ActivityManagerImpl;
import java.io.File;
/**
@@ -42,6 +44,7 @@ public class SkyActivity extends Activity {
SkyMain.ensureInitialized(getApplicationContext());
mView = new PlatformViewAndroid(this, edgeDims);
ActivityManagerImpl.setCurrentActivity(this);
setContentView(mView);
mTracingController = new TracingController(this);

View File

@@ -13,6 +13,12 @@
namespace sky {
namespace shell {
namespace {
template<typename T>
void Drop(scoped_ptr<T> ptr) { }
} // namespace
ShellView::ShellView(Shell& shell)
: shell_(shell) {
@@ -22,6 +28,10 @@ ShellView::ShellView(Shell& shell)
}
ShellView::~ShellView() {
shell_.gpu_task_runner()->PostTask(FROM_HERE,
base::Bind(&Drop<Rasterizer>, base::Passed(&rasterizer_)));
shell_.ui_task_runner()->PostTask(FROM_HERE,
base::Bind(&Drop<Engine>, base::Passed(&engine_)));
}
void ShellView::CreateEngine() {