| Index: athena/content/web_activity.cc
|
| diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
|
| index 795c8c3f7bc0257ab101cb43b6d6f696a3493b03..a5d591a359814d3e1aad7f509c28da2273dcd9f0 100644
|
| --- a/athena/content/web_activity.cc
|
| +++ b/athena/content/web_activity.cc
|
| @@ -29,6 +29,7 @@ class WebActivityController : public AcceleratorHandler {
|
| CMD_RELOAD,
|
| CMD_RELOAD_IGNORE_CACHE,
|
| CMD_CLOSE,
|
| + CMD_STOP,
|
| };
|
|
|
| explicit WebActivityController(views::WebView* web_view)
|
| @@ -51,6 +52,7 @@ class WebActivityController : public AcceleratorHandler {
|
| {TRIGGER_ON_PRESS, ui::VKEY_BROWSER_BACK, ui::EF_NONE, CMD_BACK,
|
| AF_NONE},
|
| {TRIGGER_ON_PRESS, ui::VKEY_W, ui::EF_CONTROL_DOWN, CMD_CLOSE, AF_NONE},
|
| + {TRIGGER_ON_PRESS, ui::VKEY_ESCAPE, ui::EF_NONE, CMD_STOP, AF_NONE},
|
| };
|
| accelerator_manager_->RegisterAccelerators(
|
| accelerator_data, arraysize(accelerator_data), this);
|
| @@ -97,6 +99,8 @@ class WebActivityController : public AcceleratorHandler {
|
| case CMD_CLOSE:
|
| // TODO(oshima): check onbeforeunload handler.
|
| return true;
|
| + case CMD_STOP:
|
| + return web_view_->GetWebContents()->IsLoading();
|
| }
|
| return false;
|
| }
|
| @@ -119,6 +123,9 @@ class WebActivityController : public AcceleratorHandler {
|
| case CMD_CLOSE:
|
| web_view_->GetWidget()->Close();
|
| return true;
|
| + case CMD_STOP:
|
| + web_view_->GetWebContents()->Stop();
|
| + return true;
|
| }
|
| return false;
|
| }
|
|
|