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

Side by Side Diff: chrome/browser/extensions/tab_helper.cc

Issue 883603002: Rename StreamlinedHostedApps to NewBookmarkApps in the code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments and variables Created 5 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
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/extensions/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (ExtensionSystem::Get(profile_)->extension_service() && 223 if (ExtensionSystem::Get(profile_)->extension_service() &&
224 RulesRegistryService::Get(profile_)) { 224 RulesRegistryService::Get(profile_)) {
225 RulesRegistryService::Get(profile_)->content_rules_registry()-> 225 RulesRegistryService::Get(profile_)->content_rules_registry()->
226 DidNavigateMainFrame(web_contents(), details, params); 226 DidNavigateMainFrame(web_contents(), details, params);
227 } 227 }
228 228
229 content::BrowserContext* context = web_contents()->GetBrowserContext(); 229 content::BrowserContext* context = web_contents()->GetBrowserContext();
230 ExtensionRegistry* registry = ExtensionRegistry::Get(context); 230 ExtensionRegistry* registry = ExtensionRegistry::Get(context);
231 const ExtensionSet& enabled_extensions = registry->enabled_extensions(); 231 const ExtensionSet& enabled_extensions = registry->enabled_extensions();
232 232
233 if (util::IsStreamlinedHostedAppsEnabled()) { 233 if (util::IsNewBookmarkAppsEnabled()) {
234 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); 234 Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
235 if (browser && browser->is_app()) { 235 if (browser && browser->is_app()) {
236 const Extension* extension = registry->GetExtensionById( 236 const Extension* extension = registry->GetExtensionById(
237 web_app::GetExtensionIdFromApplicationName(browser->app_name()), 237 web_app::GetExtensionIdFromApplicationName(browser->app_name()),
238 ExtensionRegistry::EVERYTHING); 238 ExtensionRegistry::EVERYTHING);
239 if (extension && AppLaunchInfo::GetFullLaunchURL(extension).is_valid()) 239 if (extension && AppLaunchInfo::GetFullLaunchURL(extension).is_valid())
240 SetExtensionApp(extension); 240 SetExtensionApp(extension);
241 } else { 241 } else {
242 UpdateExtensionAppIcon( 242 UpdateExtensionAppIcon(
243 enabled_extensions.GetExtensionOrAppByURL(params.url)); 243 enabled_extensions.GetExtensionOrAppByURL(params.url));
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 } 596 }
597 597
598 void TabHelper::SetTabId(RenderViewHost* render_view_host) { 598 void TabHelper::SetTabId(RenderViewHost* render_view_host) {
599 render_view_host->Send( 599 render_view_host->Send(
600 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), 600 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(),
601 SessionTabHelper::IdForTab(web_contents()))); 601 SessionTabHelper::IdForTab(web_contents())));
602 } 602 }
603 603
604 } // namespace extensions 604 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698