diff options
author | sgjesse@chromium.org <sgjesse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 14:04:49 +0000 |
---|---|---|
committer | sgjesse@chromium.org <sgjesse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-03 14:04:49 +0000 |
commit | 6012ad27a7c289d27bbff436bf6affd62a00a18a (patch) | |
tree | 88c98a791b774107499c4229ef4b3c046f3aba2e /chrome/browser/debugger/debugger_window.cc | |
parent | 1b25616475b3f7ac67d8c3e2d2d04adcc4ddaab5 (diff) | |
download | chromium_src-6012ad27a7c289d27bbff436bf6affd62a00a18a.zip chromium_src-6012ad27a7c289d27bbff436bf6affd62a00a18a.tar.gz chromium_src-6012ad27a7c289d27bbff436bf6affd62a00a18a.tar.bz2 |
Copy of http://codereview.chromium.org/13003 created by yury.semikhatsky@gmail.com for final commit.
Review URL: http://codereview.chromium.org/13092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger/debugger_window.cc')
-rw-r--r-- | chrome/browser/debugger/debugger_window.cc | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/chrome/browser/debugger/debugger_window.cc b/chrome/browser/debugger/debugger_window.cc index 731c907..e340bff 100644 --- a/chrome/browser/debugger/debugger_window.cc +++ b/chrome/browser/debugger/debugger_window.cc @@ -5,7 +5,7 @@ #include "base/string_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/constrained_window.h" -#include "chrome/browser/debugger/debugger_shell.h" +#include "chrome/browser/debugger/debugger_host_impl.h" #include "chrome/browser/debugger/debugger_view.h" #include "chrome/browser/debugger/debugger_window.h" #include "chrome/browser/debugger/debugger_wrapper.h" @@ -42,7 +42,7 @@ void DebuggerWindow::Show(TabContents* tab) { view_->OnShow(); debugger_ready_ = true; debugger_break_ = false; - DebuggerShell* debugger = new DebuggerShell(this); + DebuggerHostImpl* debugger = new DebuggerHostImpl(this); DebuggerWrapper* wrapper = g_browser_process->debugger_wrapper(); if (!wrapper) { g_browser_process->InitDebuggerWrapper(0); @@ -95,7 +95,7 @@ void DebuggerWindow::OutputLine(const std::string &out) { void DebuggerWindow::OutputPrompt(const std::string& prompt) { } -void DebuggerWindow::Start(DebuggerShell* debugger) { +void DebuggerWindow::Start(DebuggerHost* debugger) { #ifndef CHROME_DEBUGGER_DISABLED DebuggerInputOutput::Start(debugger); #endif @@ -116,8 +116,6 @@ void DebuggerWindow::SetDebuggerBreak(bool brk) { if (debugger_break_ != brk) { debugger_break_ = brk; if (window_) { - if (view_) - view_->SetDebuggerBreak(brk); window_->UpdateWindowTitle(); if (brk) window_->Activate(); @@ -126,6 +124,17 @@ void DebuggerWindow::SetDebuggerBreak(bool brk) { #endif } +void DebuggerWindow::CallFunctionInPage(const std::wstring& name, + ListValue* argv) { + if (view_) { + DictionaryValue* body = new DictionaryValue; + body->Set(L"arguments", argv); + view_->SendEventToPage(name, body); + } else { + delete argv; + } +} + /////////////////////////////////////////////////////////////////// // views::WindowDelegate methods @@ -160,27 +169,3 @@ bool DebuggerWindow::CanResize() const { views::View* DebuggerWindow::GetContentsView() { return view_; } - -/////////////////////////////////////////////////////////////////// -// Overridden from views::TextField::Controller: - -void DebuggerWindow::ContentsChanged(views::TextField* sender, - const std::wstring& new_contents) { - // -} - -void DebuggerWindow::HandleKeystroke(views::TextField* sender, UINT message, - TCHAR key, UINT repeat_count, - UINT flags) { -#ifndef CHROME_DEBUGGER_DISABLED - if (key == VK_RETURN) { - std::wstring txt = sender->GetText(); - if (txt.length()) { - view_->Output(L"$ " + txt); - debugger_->ProcessCommand(txt); - sender->SetText(L""); - } - } -#endif -} - |