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

Side by Side Diff: chrome/browser/ui/webui/inspect_ui.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
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/ui/webui/inspect_ui.h" 5 #include "chrome/browser/ui/webui/inspect_ui.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 title = UTF16ToUTF8(web_contents->GetTitle()); 125 title = UTF16ToUTF8(web_contents->GetTitle());
126 content::NavigationController& controller = web_contents->GetController(); 126 content::NavigationController& controller = web_contents->GetController();
127 content::NavigationEntry* entry = controller.GetActiveEntry(); 127 content::NavigationEntry* entry = controller.GetActiveEntry();
128 if (entry != NULL && entry->GetURL().is_valid()) 128 if (entry != NULL && entry->GetURL().is_valid())
129 favicon_url = entry->GetFavicon().url; 129 favicon_url = entry->GetFavicon().url;
130 130
131 Profile* profile = Profile::FromBrowserContext( 131 Profile* profile = Profile::FromBrowserContext(
132 web_contents->GetBrowserContext()); 132 web_contents->GetBrowserContext());
133 if (profile) { 133 if (profile) {
134 ExtensionService* extension_service = profile->GetExtensionService(); 134 ExtensionService* extension_service = profile->GetExtensionService();
135 const Extension* extension = extension_service->extensions()->GetByID( 135 const extensions::Extension* extension = extension_service->
136 web_contents->GetURL().host()); 136 extensions()->GetByID(web_contents->GetURL().host());
137 if (extension) { 137 if (extension) {
138 target_type = kExtensionTargetType; 138 target_type = kExtensionTargetType;
139 title = extension->name(); 139 title = extension->name();
140 } 140 }
141 } 141 }
142 } 142 }
143 143
144 return BuildTargetDescriptor(target_type, 144 return BuildTargetDescriptor(target_type,
145 HasClientHost(rvh), 145 HasClientHost(rvh),
146 rvh_delegate->GetURL(), 146 rvh_delegate->GetURL(),
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 417
418 void InspectUI::StopListeningNotifications() 418 void InspectUI::StopListeningNotifications()
419 { 419 {
420 if (!observer_) 420 if (!observer_)
421 return; 421 return;
422 observer_->InspectUIDestroyed(); 422 observer_->InspectUIDestroyed();
423 observer_ = NULL; 423 observer_ = NULL;
424 registrar_.RemoveAll(); 424 registrar_.RemoveAll();
425 } 425 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_handler.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698