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_window.h" | 5 #include "chrome/browser/debugger/debugger_window.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/debugger/debugger_host_impl.h" | 10 #include "chrome/browser/debugger/debugger_host_impl.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 return wrapper->GetDebugger() != NULL; | 31 return wrapper->GetDebugger() != NULL; |
32 } | 32 } |
33 | 33 |
34 void DebuggerWindow::Show(TabContents* tab) { | 34 void DebuggerWindow::Show(TabContents* tab) { |
35 #ifndef CHROME_DEBUGGER_DISABLED | 35 #ifndef CHROME_DEBUGGER_DISABLED |
36 if (window_) { | 36 if (window_) { |
37 window_->Show(); | 37 window_->Show(); |
38 view_->OnShow(); | 38 view_->OnShow(); |
39 return; | 39 return; |
40 } | 40 } |
41 view_ = new DebuggerView(); | 41 view_ = new DebuggerView(this); |
42 window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(), this); | 42 window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(), this); |
43 window_->Show(); | 43 window_->Show(); |
44 view_->OnShow(); | 44 view_->OnShow(); |
45 debugger_ready_ = true; | 45 debugger_ready_ = true; |
46 debugger_break_ = false; | 46 debugger_break_ = false; |
47 DebuggerHostImpl* debugger = new DebuggerHostImpl(this); | 47 DebuggerHostImpl* debugger = new DebuggerHostImpl(this); |
48 DebuggerWrapper* wrapper = g_browser_process->debugger_wrapper(); | 48 DebuggerWrapper* wrapper = g_browser_process->debugger_wrapper(); |
49 if (!wrapper) { | 49 if (!wrapper) { |
50 g_browser_process->InitDebuggerWrapper(0); | 50 g_browser_process->InitDebuggerWrapper(0); |
51 wrapper = g_browser_process->debugger_wrapper(); | 51 wrapper = g_browser_process->debugger_wrapper(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 wrapper->SetDebugger(NULL); | 164 wrapper->SetDebugger(NULL); |
165 } | 165 } |
166 | 166 |
167 bool DebuggerWindow::CanResize() const { | 167 bool DebuggerWindow::CanResize() const { |
168 return true; | 168 return true; |
169 } | 169 } |
170 | 170 |
171 views::View* DebuggerWindow::GetContentsView() { | 171 views::View* DebuggerWindow::GetContentsView() { |
172 return view_; | 172 return view_; |
173 } | 173 } |
OLD | NEW |