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

Side by Side Diff: chrome/browser/devtools/devtools_window.cc

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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
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 #include "chrome/browser/devtools/devtools_window.h" 5 #include "chrome/browser/devtools/devtools_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "content/public/browser/render_process_host.h" 58 #include "content/public/browser/render_process_host.h"
59 #include "content/public/browser/render_view_host.h" 59 #include "content/public/browser/render_view_host.h"
60 #include "content/public/browser/user_metrics.h" 60 #include "content/public/browser/user_metrics.h"
61 #include "content/public/browser/web_contents.h" 61 #include "content/public/browser/web_contents.h"
62 #include "content/public/browser/web_contents_observer.h" 62 #include "content/public/browser/web_contents_observer.h"
63 #include "content/public/browser/web_contents_view.h" 63 #include "content/public/browser/web_contents_view.h"
64 #include "content/public/common/bindings_policy.h" 64 #include "content/public/common/bindings_policy.h"
65 #include "content/public/common/content_client.h" 65 #include "content/public/common/content_client.h"
66 #include "content/public/common/page_transition_types.h" 66 #include "content/public/common/page_transition_types.h"
67 #include "content/public/common/url_constants.h" 67 #include "content/public/common/url_constants.h"
68 #include "extensions/common/extension_set.h"
68 #include "grit/generated_resources.h" 69 #include "grit/generated_resources.h"
69 #include "ui/base/l10n/l10n_util.h" 70 #include "ui/base/l10n/l10n_util.h"
70 71
71 using base::DictionaryValue; 72 using base::DictionaryValue;
72 using content::BrowserThread; 73 using content::BrowserThread;
73 using content::DevToolsAgentHost; 74 using content::DevToolsAgentHost;
74 75
75 76
76 // DevToolsConfirmInfoBarDelegate --------------------------------------------- 77 // DevToolsConfirmInfoBarDelegate ---------------------------------------------
77 78
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 CallClientFunction("WebInspector.setInspectedTabId", &tabId, NULL, NULL); 1466 CallClientFunction("WebInspector.setInspectedTabId", &tabId, NULL, NULL);
1466 } 1467 }
1467 } 1468 }
1468 1469
1469 Profile* profile = 1470 Profile* profile =
1470 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 1471 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
1471 const ExtensionService* extension_service = extensions::ExtensionSystem::Get( 1472 const ExtensionService* extension_service = extensions::ExtensionSystem::Get(
1472 profile->GetOriginalProfile())->extension_service(); 1473 profile->GetOriginalProfile())->extension_service();
1473 if (!extension_service) 1474 if (!extension_service)
1474 return; 1475 return;
1475 const ExtensionSet* extensions = extension_service->extensions(); 1476 const extensions::ExtensionSet* extensions = extension_service->extensions();
1476 1477
1477 ListValue results; 1478 ListValue results;
1478 for (ExtensionSet::const_iterator extension(extensions->begin()); 1479 for (extensions::ExtensionSet::const_iterator extension(extensions->begin());
1479 extension != extensions->end(); ++extension) { 1480 extension != extensions->end(); ++extension) {
1480 if (extensions::ManifestURL::GetDevToolsPage(extension->get()).is_empty()) 1481 if (extensions::ManifestURL::GetDevToolsPage(extension->get()).is_empty())
1481 continue; 1482 continue;
1482 DictionaryValue* extension_info = new DictionaryValue(); 1483 DictionaryValue* extension_info = new DictionaryValue();
1483 extension_info->Set( 1484 extension_info->Set(
1484 "startPage", 1485 "startPage",
1485 new StringValue( 1486 new StringValue(
1486 extensions::ManifestURL::GetDevToolsPage(extension->get()).spec())); 1487 extensions::ManifestURL::GetDevToolsPage(extension->get()).spec()));
1487 extension_info->Set("name", new StringValue((*extension)->name())); 1488 extension_info->Set("name", new StringValue((*extension)->name()));
1488 extension_info->Set( 1489 extension_info->Set(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 return inspected_contents_observer_ ? 1537 return inspected_contents_observer_ ?
1537 inspected_contents_observer_->web_contents() : NULL; 1538 inspected_contents_observer_->web_contents() : NULL;
1538 } 1539 }
1539 1540
1540 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() { 1541 void DevToolsWindow::DocumentOnLoadCompletedInMainFrame() {
1541 is_loaded_ = true; 1542 is_loaded_ = true;
1542 UpdateTheme(); 1543 UpdateTheme();
1543 DoAction(); 1544 DoAction();
1544 AddDevToolsExtensionsToClient(); 1545 AddDevToolsExtensionsToClient();
1545 } 1546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698