| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/debugger/debugger_view.h" | 5 #include "chrome/browser/debugger/debugger_view.h" |
| 6 | 6 |
| 7 #include "app/gfx/chrome_canvas.h" | 7 #include "app/gfx/chrome_canvas.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // We can't create the TabContents until we've actually been put into a real | 99 // We can't create the TabContents until we've actually been put into a real |
| 100 // view hierarchy somewhere. | 100 // view hierarchy somewhere. |
| 101 Profile* profile = BrowserList::GetLastActive()->profile(); | 101 Profile* profile = BrowserList::GetLastActive()->profile(); |
| 102 tab_contents_ = new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL); | 102 tab_contents_ = new TabContents(profile, NULL, MSG_ROUTING_NONE, NULL); |
| 103 | 103 |
| 104 tab_contents_->set_delegate(this); | 104 tab_contents_->set_delegate(this); |
| 105 web_container_->SetTabContents(tab_contents_); | 105 web_container_->SetTabContents(tab_contents_); |
| 106 tab_contents_->render_view_host()->AllowDOMUIBindings(); | 106 tab_contents_->render_view_host()->AllowDOMUIBindings(); |
| 107 | 107 |
| 108 GURL contents(std::string(chrome::kChromeUIScheme) + | 108 GURL contents(std::string(chrome::kChromeUIScheme) + |
| 109 "//inspector/debugger.html"); | 109 "://inspector/debugger.html"); |
| 110 tab_contents_->controller().LoadURL(contents, GURL(), | 110 tab_contents_->controller().LoadURL(contents, GURL(), |
| 111 PageTransition::START_PAGE); | 111 PageTransition::START_PAGE); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void DebuggerView::OnShow() { | 114 void DebuggerView::OnShow() { |
| 115 tab_contents_->Focus(); | 115 tab_contents_->Focus(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void DebuggerView::OnClose() { | 118 void DebuggerView::OnClose() { |
| 119 web_container_->SetTabContents(NULL); | 119 web_container_->SetTabContents(NULL); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 void DebuggerView::LoadingStateChanged(TabContents* source) { | 157 void DebuggerView::LoadingStateChanged(TabContents* source) { |
| 158 if (!source->is_loading()) | 158 if (!source->is_loading()) |
| 159 SetOutputViewReady(); | 159 SetOutputViewReady(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool DebuggerView::AcceleratorPressed(const views::Accelerator& accelerator) { | 162 bool DebuggerView::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 163 DCHECK(accelerator.GetKeyCode() == VK_ESCAPE); | 163 DCHECK(accelerator.GetKeyCode() == VK_ESCAPE); |
| 164 window_->window()->Close(); | 164 window_->window()->Close(); |
| 165 return true; | 165 return true; |
| 166 } | 166 } |
| OLD | NEW |