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

Side by Side Diff: chrome/browser/ui/webui/options/extension_settings_handler.cc

Issue 7322004: DevTools: devtools manager should know nothing about DevToolsWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extensions/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 16 matching lines...) Expand all
27 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
28 #include "chrome/browser/tab_contents/background_contents.h" 28 #include "chrome/browser/tab_contents/background_contents.h"
29 #include "chrome/browser/ui/browser_list.h" 29 #include "chrome/browser/ui/browser_list.h"
30 #include "chrome/common/extensions/extension.h" 30 #include "chrome/common/extensions/extension.h"
31 #include "chrome/common/extensions/extension_icon_set.h" 31 #include "chrome/common/extensions/extension_icon_set.h"
32 #include "chrome/common/extensions/url_pattern.h" 32 #include "chrome/common/extensions/url_pattern.h"
33 #include "chrome/common/extensions/user_script.h" 33 #include "chrome/common/extensions/user_script.h"
34 #include "chrome/common/jstemplate_builder.h" 34 #include "chrome/common/jstemplate_builder.h"
35 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
36 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
37 #include "content/browser/debugger/devtools_manager.h" 37 #include "content/browser/debugger/devtools_window.h"
38 #include "content/browser/debugger/devtools_toggle_action.h"
39 #include "content/browser/renderer_host/render_process_host.h" 38 #include "content/browser/renderer_host/render_process_host.h"
40 #include "content/browser/renderer_host/render_view_host.h" 39 #include "content/browser/renderer_host/render_view_host.h"
41 #include "content/browser/renderer_host/render_widget_host.h" 40 #include "content/browser/renderer_host/render_widget_host.h"
42 #include "content/browser/tab_contents/tab_contents.h" 41 #include "content/browser/tab_contents/tab_contents.h"
43 #include "content/browser/tab_contents/tab_contents_view.h" 42 #include "content/browser/tab_contents/tab_contents_view.h"
44 #include "content/common/notification_service.h" 43 #include "content/common/notification_service.h"
45 #include "content/common/notification_type.h" 44 #include "content/common/notification_type.h"
46 #include "grit/browser_resources.h" 45 #include "grit/browser_resources.h"
47 #include "grit/chromium_strings.h" 46 #include "grit/chromium_strings.h"
48 #include "grit/generated_resources.h" 47 #include "grit/generated_resources.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 CHECK(args->GetString(1, &render_view_id_str)); 456 CHECK(args->GetString(1, &render_view_id_str));
458 CHECK(base::StringToInt(render_process_id_str, &render_process_id)); 457 CHECK(base::StringToInt(render_process_id_str, &render_process_id));
459 CHECK(base::StringToInt(render_view_id_str, &render_view_id)); 458 CHECK(base::StringToInt(render_view_id_str, &render_view_id));
460 RenderViewHost* host = RenderViewHost::FromID(render_process_id, 459 RenderViewHost* host = RenderViewHost::FromID(render_process_id,
461 render_view_id); 460 render_view_id);
462 if (!host) { 461 if (!host) {
463 // This can happen if the host has gone away since the page was displayed. 462 // This can happen if the host has gone away since the page was displayed.
464 return; 463 return;
465 } 464 }
466 465
467 DevToolsManager::GetInstance()->OpenDevToolsWindow(host); 466 DevToolsWindow::OpenDevToolsWindow(host);
468 } 467 }
469 468
470 void ExtensionsDOMHandler::HandleReloadMessage(const ListValue* args) { 469 void ExtensionsDOMHandler::HandleReloadMessage(const ListValue* args) {
471 std::string extension_id = WideToASCII(ExtractStringValue(args)); 470 std::string extension_id = WideToASCII(ExtractStringValue(args));
472 CHECK(!extension_id.empty()); 471 CHECK(!extension_id.empty());
473 extension_service_->ReloadExtension(extension_id); 472 extension_service_->ReloadExtension(extension_id);
474 } 473 }
475 474
476 void ExtensionsDOMHandler::HandleEnableMessage(const ListValue* args) { 475 void ExtensionsDOMHandler::HandleEnableMessage(const ListValue* args) {
477 CHECK(args->GetSize() == 2); 476 CHECK(args->GetSize() == 2);
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 return ResourceBundle::GetSharedInstance(). 914 return ResourceBundle::GetSharedInstance().
916 LoadDataResourceBytes(IDR_PLUGIN); 915 LoadDataResourceBytes(IDR_PLUGIN);
917 } 916 }
918 917
919 // static 918 // static
920 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 919 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
921 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, 920 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode,
922 false, 921 false,
923 PrefService::SYNCABLE_PREF); 922 PrefService::SYNCABLE_PREF);
924 } 923 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | content/browser/debugger/devtools_client_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698