summaryrefslogtreecommitdiffstats
path: root/chrome/browser/debugger/debugger_view.cc
diff options
context:
space:
mode:
authorsgjesse@chromium.org <sgjesse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 18:54:22 +0000
committersgjesse@chromium.org <sgjesse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 18:54:22 +0000
commitdd98928411d4dcf3c0371fb86e71fbeaf7b3d3df (patch)
tree51e49ea2a31cc6b13db0ae6cf95dce575031389b /chrome/browser/debugger/debugger_view.cc
parentd9f5daca67369220f34029ecdd77e288d46c3596 (diff)
downloadchromium_src-dd98928411d4dcf3c0371fb86e71fbeaf7b3d3df.zip
chromium_src-dd98928411d4dcf3c0371fb86e71fbeaf7b3d3df.tar.gz
chromium_src-dd98928411d4dcf3c0371fb86e71fbeaf7b3d3df.tar.bz2
Stop debugger by escape key.
BUG=6890 Review URL: http://codereview.chromium.org/92116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14862 0039d316-1c4b-4281-b951-d872f2087c98
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;
+}
+