| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/json_writer.h" | 9 #include "base/json_writer.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 | 32 |
| 33 DebuggerView::DebuggerView() : output_ready_(false) { | 33 DebuggerView::DebuggerView() : output_ready_(false) { |
| 34 web_container_ = new TabContentsContainerView(); | 34 web_container_ = new TabContentsContainerView(); |
| 35 AddChildView(web_container_); | 35 AddChildView(web_container_); |
| 36 } | 36 } |
| 37 | 37 |
| 38 DebuggerView::~DebuggerView() { | 38 DebuggerView::~DebuggerView() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 void DebuggerView::GetPreferredSize(CSize* out) { | 41 gfx::Size DebuggerView::GetPreferredSize() { |
| 42 out->cx = 700; | 42 return gfx::Size(700, 400); |
| 43 out->cy = 400; | |
| 44 } | 43 } |
| 45 | 44 |
| 46 void DebuggerView::Layout() { | 45 void DebuggerView::Layout() { |
| 47 web_container_->SetBounds(0, 0, width(), height()); | 46 web_container_->SetBounds(0, 0, width(), height()); |
| 48 } | 47 } |
| 49 | 48 |
| 50 void DebuggerView::DidChangeBounds(const CRect& previous, | 49 void DebuggerView::DidChangeBounds(const CRect& previous, |
| 51 const CRect& current) { | 50 const CRect& current) { |
| 52 Layout(); | 51 Layout(); |
| 53 } | 52 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 const std::string url = StringPrintf("javascript:void(%s)", js.c_str()); | 137 const std::string url = StringPrintf("javascript:void(%s)", js.c_str()); |
| 139 web_contents_->render_view_host()->ExecuteJavascriptInWebFrame(L"", | 138 web_contents_->render_view_host()->ExecuteJavascriptInWebFrame(L"", |
| 140 UTF8ToWide(url)); | 139 UTF8ToWide(url)); |
| 141 } | 140 } |
| 142 | 141 |
| 143 void DebuggerView::LoadingStateChanged(TabContents* source) { | 142 void DebuggerView::LoadingStateChanged(TabContents* source) { |
| 144 if (!source->is_loading()) | 143 if (!source->is_loading()) |
| 145 SetOutputViewReady(); | 144 SetOutputViewReady(); |
| 146 } | 145 } |
| 147 | 146 |
| OLD | NEW |