| 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/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" |
| 11 #include "base/json_writer.h" | 11 #include "base/json_writer.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/browser_list.h" | 13 #include "chrome/browser/browser_list.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/debugger/debugger_shell.h" | 15 #include "chrome/browser/debugger/debugger_shell.h" |
| 16 #include "chrome/browser/debugger/debugger_window.h" | 16 #include "chrome/browser/debugger/debugger_window.h" |
| 17 #include "chrome/browser/debugger/debugger_wrapper.h" | 17 #include "chrome/browser/debugger/debugger_wrapper.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 void DebuggerView::ViewHierarchyChanged(bool is_add, | 51 void DebuggerView::ViewHierarchyChanged(bool is_add, |
| 52 views::View* parent, | 52 views::View* parent, |
| 53 views::View* child) { | 53 views::View* child) { |
| 54 if (is_add && child == this) { | 54 if (is_add && child == this) { |
| 55 DCHECK(GetWidget()); | 55 DCHECK(GetWidget()); |
| 56 OnInit(); | 56 OnInit(); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 void DebuggerView::Paint(ChromeCanvas* canvas) { | 60 void DebuggerView::Paint(gfx::Canvas* canvas) { |
| 61 #ifndef NDEBUG | 61 #ifndef NDEBUG |
| 62 SkPaint paint; | 62 SkPaint paint; |
| 63 canvas->FillRectInt(SK_ColorCYAN, x(), y(), width(), height()); | 63 canvas->FillRectInt(SK_ColorCYAN, x(), y(), width(), height()); |
| 64 #endif | 64 #endif |
| 65 } | 65 } |
| 66 | 66 |
| 67 void DebuggerView::SetOutputViewReady() { | 67 void DebuggerView::SetOutputViewReady() { |
| 68 output_ready_ = true; | 68 output_ready_ = true; |
| 69 for (std::vector<std::wstring>::iterator i = pending_output_.begin(); | 69 for (std::vector<std::wstring>::iterator i = pending_output_.begin(); |
| 70 i != pending_output_.end(); ++i) { | 70 i != pending_output_.end(); ++i) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void DebuggerView::LoadingStateChanged(TabContents* source) { | 156 void DebuggerView::LoadingStateChanged(TabContents* source) { |
| 157 if (!source->is_loading()) | 157 if (!source->is_loading()) |
| 158 SetOutputViewReady(); | 158 SetOutputViewReady(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 bool DebuggerView::AcceleratorPressed(const views::Accelerator& accelerator) { | 161 bool DebuggerView::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 162 DCHECK(accelerator.GetKeyCode() == VK_ESCAPE); | 162 DCHECK(accelerator.GetKeyCode() == VK_ESCAPE); |
| 163 window_->window()->Close(); | 163 window_->window()->Close(); |
| 164 return true; | 164 return true; |
| 165 } | 165 } |
| OLD | NEW |