diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 05:29:27 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 05:29:27 +0000 |
commit | 4c4d8d2b8aa8ae394d0f933700ddd9e682b141af (patch) | |
tree | 6e3e10e71c29bb9cc8d221d4de38d9dc603e32cd /chrome/browser/debugger | |
parent | 39d74d8b3c05faf98935927b68eaebb9a23a76a4 (diff) | |
download | chromium_src-4c4d8d2b8aa8ae394d0f933700ddd9e682b141af.zip chromium_src-4c4d8d2b8aa8ae394d0f933700ddd9e682b141af.tar.gz chromium_src-4c4d8d2b8aa8ae394d0f933700ddd9e682b141af.tar.bz2 |
Convert NavigationEntry title to string16. TabContents::GetTitle no longer needs
to be virtual, either.
This also changes how the display URL is computed. Instead of doing it
preemptively, we now do so lazily. This allows us to do the URL formatting
correctly using the elider so that we can do IDN and unescaping.
I changed string_util's singleton functions. I was worried that other code
might make a singleton of string, which would give you this same value as a
non-const string. This would mean our empty strings might no longer be empty.
Review URL: http://codereview.chromium.org/39022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r-- | chrome/browser/debugger/debugger_host_impl.cpp | 6 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_node.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/debugger/debugger_host_impl.cpp b/chrome/browser/debugger/debugger_host_impl.cpp index 04eba09..beeb398 100644 --- a/chrome/browser/debugger/debugger_host_impl.cpp +++ b/chrome/browser/debugger/debugger_host_impl.cpp @@ -65,7 +65,7 @@ class TabContentsReference : public NotificationObserver { }; -DebuggerHostImpl::DebuggerHostImpl(DebuggerInputOutput* io) +DebuggerHostImpl::DebuggerHostImpl(DebuggerInputOutput* io) : io_(io), debugger_ready_(true) { } @@ -98,7 +98,7 @@ void DebuggerHostImpl::OnDebugAttach() { std::wstring title; const TabContents* t = GetTabContentsBeingDebugged(); if (t) { - title = t->GetTitle(); + title = UTF16ToWideHack(t->GetTitle()); } ListValue* argv = new ListValue; @@ -178,7 +178,7 @@ void DebuggerHostImpl::OnDebuggerHostMsg(const ListValue* args) { return; } io_->SetDebuggerBreak(brk == L"true"); - } + } } TabContents* DebuggerHostImpl::GetTabContentsBeingDebugged() const { diff --git a/chrome/browser/debugger/debugger_node.cc b/chrome/browser/debugger/debugger_node.cc index 4bfec06..31374c6 100644 --- a/chrome/browser/debugger/debugger_node.cc +++ b/chrome/browser/debugger/debugger_node.cc @@ -201,7 +201,7 @@ v8::Handle<v8::Value> BrowserNode::PropGetter(v8::Handle<v8::String> prop, if (b != NULL) { if (prop->Equals(v8::String::New("title"))) { const TabContents *t = b->GetSelectedTabContents(); - std::wstring title = t->GetTitle(); + std::wstring title = UTF16ToWideHack(t->GetTitle()); std::string title2 = WideToUTF8(title); return v8::String::New(title2.c_str()); } else if (prop->Equals(v8::String::New("tab"))) { @@ -359,7 +359,7 @@ v8::Handle<v8::Value> TabNode::PropGetter(v8::Handle<v8::String> prop, if (t != NULL) { WebContents* web = t->AsWebContents(); if (prop->Equals(v8::String::New("title"))) { - std::wstring title = t->GetTitle(); + std::wstring title = UTF16ToWideHack(t->GetTitle()); std::string title2 = WideToUTF8(title); return v8::String::New(title2.c_str()); } else if (web) { |