summaryrefslogtreecommitdiffstats
path: root/chrome/browser/debugger/debugger_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/debugger/debugger_view.cc')
-rw-r--r--chrome/browser/debugger/debugger_view.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/debugger/debugger_view.cc b/chrome/browser/debugger/debugger_view.cc
index 0c9f6f8..c292b39 100644
--- a/chrome/browser/debugger/debugger_view.cc
+++ b/chrome/browser/debugger/debugger_view.cc
@@ -30,9 +30,11 @@
#include "grit/debugger_resources.h"
-DebuggerView::DebuggerView() : output_ready_(false) {
+DebuggerView::DebuggerView(DebuggerWindow* window)
+ : window_(window), output_ready_(false) {
web_container_ = new TabContentsContainerView();
AddChildView(web_container_);
+ AddAccelerator(views::Accelerator(VK_ESCAPE, false, false, false));
}
DebuggerView::~DebuggerView() {
@@ -155,3 +157,10 @@ void DebuggerView::LoadingStateChanged(TabContents* source) {
if (!source->is_loading())
SetOutputViewReady();
}
+
+bool DebuggerView::AcceleratorPressed(const views::Accelerator& accelerator) {
+ DCHECK(accelerator.GetKeyCode() == VK_ESCAPE);
+ window_->window()->Close();
+ return true;
+}
+