| 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 // This file defines utility functions for working with strings. | 5 // This file defines utility functions for working with strings. |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/debugger/debugger_contents.h" | 10 #include "chrome/browser/debugger/debugger_contents.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 shell->ProcessCommand(command); | 96 shell->ProcessCommand(command); |
| 97 #endif | 97 #endif |
| 98 } | 98 } |
| 99 private: | 99 private: |
| 100 DISALLOW_EVIL_CONSTRUCTORS(DebuggerHandler); | 100 DISALLOW_EVIL_CONSTRUCTORS(DebuggerHandler); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 | 103 |
| 104 DebuggerContents::DebuggerContents(Profile* profile, SiteInstance* instance) | 104 DebuggerContents::DebuggerContents(Profile* profile, SiteInstance* instance) |
| 105 : DOMUIHost(profile, instance, NULL) { | 105 : DOMUIHost(profile, instance, NULL) { |
| 106 type_ = TAB_CONTENTS_DEBUGGER; | 106 set_type(TAB_CONTENTS_DEBUGGER); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void DebuggerContents::AttachMessageHandlers() { | 109 void DebuggerContents::AttachMessageHandlers() { |
| 110 AddMessageHandler(new DebuggerHandler(this)); | 110 AddMessageHandler(new DebuggerHandler(this)); |
| 111 | 111 |
| 112 DebuggerHTMLSource* html_source = new DebuggerHTMLSource(); | 112 DebuggerHTMLSource* html_source = new DebuggerHTMLSource(); |
| 113 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 113 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
| 114 NewRunnableMethod(&chrome_url_data_manager, | 114 NewRunnableMethod(&chrome_url_data_manager, |
| 115 &ChromeURLDataManager::AddDataSource, | 115 &ChromeURLDataManager::AddDataSource, |
| 116 html_source)); | 116 html_source)); |
| 117 } | 117 } |
| 118 | 118 |
| 119 // static | 119 // static |
| 120 bool DebuggerContents::IsDebuggerUrl(const GURL& url) { | 120 bool DebuggerContents::IsDebuggerUrl(const GURL& url) { |
| 121 if (url.SchemeIs("chrome-resource") && url.host() == "debugger") | 121 if (url.SchemeIs("chrome-resource") && url.host() == "debugger") |
| 122 return true; | 122 return true; |
| 123 return false; | 123 return false; |
| 124 } | 124 } |
| 125 | 125 |
| OLD | NEW |