Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/extensions/api/debugger/debugger_api.cc

Issue 11828040: Revert 175971 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Implements the Chrome Extensions Debugger API. 5 // Implements the Chrome Extensions Debugger API.
6 6
7 #include "chrome/browser/extensions/api/debugger/debugger_api.h" 7 #include "chrome/browser/extensions/api/debugger/debugger_api.h"
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 18 matching lines...) Expand all
29 #include "chrome/common/extensions/api/debugger.h" 29 #include "chrome/common/extensions/api/debugger.h"
30 #include "chrome/common/extensions/extension.h" 30 #include "chrome/common/extensions/extension.h"
31 #include "content/public/browser/devtools_agent_host.h" 31 #include "content/public/browser/devtools_agent_host.h"
32 #include "content/public/browser/devtools_client_host.h" 32 #include "content/public/browser/devtools_client_host.h"
33 #include "content/public/browser/devtools_manager.h" 33 #include "content/public/browser/devtools_manager.h"
34 #include "content/public/browser/notification_service.h" 34 #include "content/public/browser/notification_service.h"
35 #include "content/public/browser/notification_source.h" 35 #include "content/public/browser/notification_source.h"
36 #include "content/public/browser/render_view_host.h" 36 #include "content/public/browser/render_view_host.h"
37 #include "content/public/browser/web_contents.h" 37 #include "content/public/browser/web_contents.h"
38 #include "content/public/common/content_client.h" 38 #include "content/public/common/content_client.h"
39 #include "content/public/common/url_constants.h"
40 #include "extensions/common/error_utils.h" 39 #include "extensions/common/error_utils.h"
41 #include "grit/generated_resources.h" 40 #include "grit/generated_resources.h"
42 #include "ui/base/l10n/l10n_util.h" 41 #include "ui/base/l10n/l10n_util.h"
43 #include "webkit/glue/webkit_glue.h" 42 #include "webkit/glue/webkit_glue.h"
44 43
45 using content::DevToolsAgentHost; 44 using content::DevToolsAgentHost;
46 using content::DevToolsClientHost; 45 using content::DevToolsClientHost;
47 using content::DevToolsManager; 46 using content::DevToolsManager;
48 using content::WebContents; 47 using content::WebContents;
49 using extensions::api::debugger::Debuggee; 48 using extensions::api::debugger::Debuggee;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 bool result = ExtensionTabUtil::GetTabById( 421 bool result = ExtensionTabUtil::GetTabById(
423 tab_id_, profile(), include_incognito(), NULL, NULL, &web_contents, NULL); 422 tab_id_, profile(), include_incognito(), NULL, NULL, &web_contents, NULL);
424 if (!result || !web_contents) { 423 if (!result || !web_contents) {
425 error_ = ErrorUtils::FormatErrorMessage( 424 error_ = ErrorUtils::FormatErrorMessage(
426 keys::kNoTabError, 425 keys::kNoTabError,
427 base::IntToString(tab_id_)); 426 base::IntToString(tab_id_));
428 return false; 427 return false;
429 } 428 }
430 contents_ = web_contents; 429 contents_ = web_contents;
431 430
432 if (content::HasWebUIScheme(contents_->GetURL())) { 431 if (content::GetContentClient()->HasWebUIScheme(
432 contents_->GetURL())) {
433 error_ = ErrorUtils::FormatErrorMessage( 433 error_ = ErrorUtils::FormatErrorMessage(
434 keys::kAttachToWebUIError, 434 keys::kAttachToWebUIError,
435 contents_->GetURL().scheme()); 435 contents_->GetURL().scheme());
436 return false; 436 return false;
437 } 437 }
438 438
439 return true; 439 return true;
440 } 440 }
441 441
442 bool DebuggerFunction::InitClientHost() { 442 bool DebuggerFunction::InitClientHost() {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 542
543 DictionaryValue* result_body; 543 DictionaryValue* result_body;
544 SendCommand::Results::Result result; 544 SendCommand::Results::Result result;
545 if (response->GetDictionary("result", &result_body)) 545 if (response->GetDictionary("result", &result_body))
546 result.additional_properties.Swap(result_body); 546 result.additional_properties.Swap(result_body);
547 547
548 results_ = SendCommand::Results::Create(result); 548 results_ = SendCommand::Results::Create(result);
549 SendResponse(true); 549 SendResponse(true);
550 } 550 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698