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

Side by Side Diff: chrome/browser/background/background_contents_service.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: Move ExtensionSet to extensions namespace 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/background/background_contents_service.h" 5 #include "chrome/browser/background/background_contents_service.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 dict->GetString(kUrlKey, &url); 578 dict->GetString(kUrlKey, &url);
579 dict->GetString(kFrameNameKey, &frame_name); 579 dict->GetString(kFrameNameKey, &frame_name);
580 LoadBackgroundContents(profile, 580 LoadBackgroundContents(profile,
581 GURL(url), 581 GURL(url),
582 frame_name, 582 frame_name,
583 UTF8ToUTF16(extension_id)); 583 UTF8ToUTF16(extension_id));
584 } 584 }
585 585
586 void BackgroundContentsService::LoadBackgroundContentsFromManifests( 586 void BackgroundContentsService::LoadBackgroundContentsFromManifests(
587 Profile* profile) { 587 Profile* profile) {
588 const ExtensionSet* extensions = extensions::ExtensionSystem::Get(profile)-> 588 const extensions::ExtensionSet* extensions =
589 extension_service()->extensions(); 589 extensions::ExtensionSystem::Get(profile)->
590 ExtensionSet::const_iterator iter = extensions->begin(); 590 extension_service()->extensions();
591 for (; iter != extensions->end(); ++iter) { 591 for (extensions::ExtensionSet::const_iterator iter = extensions->begin();
592 iter != extensions->end(); ++iter) {
592 const Extension* extension = iter->get(); 593 const Extension* extension = iter->get();
593 if (extension->is_hosted_app() && 594 if (extension->is_hosted_app() &&
594 BackgroundInfo::HasBackgroundPage(extension)) { 595 BackgroundInfo::HasBackgroundPage(extension)) {
595 LoadBackgroundContents(profile, 596 LoadBackgroundContents(profile,
596 BackgroundInfo::GetBackgroundURL(extension), 597 BackgroundInfo::GetBackgroundURL(extension),
597 ASCIIToUTF16("background"), 598 ASCIIToUTF16("background"),
598 UTF8ToUTF16(extension->id())); 599 UTF8ToUTF16(extension->id()));
599 } 600 }
600 } 601 }
601 } 602 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 bool user_gesture, 759 bool user_gesture,
759 bool* was_blocked) { 760 bool* was_blocked) {
760 Browser* browser = chrome::FindLastActiveWithProfile( 761 Browser* browser = chrome::FindLastActiveWithProfile(
761 Profile::FromBrowserContext(new_contents->GetBrowserContext()), 762 Profile::FromBrowserContext(new_contents->GetBrowserContext()),
762 chrome::GetActiveDesktop()); 763 chrome::GetActiveDesktop());
763 if (browser) { 764 if (browser) {
764 chrome::AddWebContents(browser, NULL, new_contents, disposition, 765 chrome::AddWebContents(browser, NULL, new_contents, disposition,
765 initial_pos, user_gesture, was_blocked); 766 initial_pos, user_gesture, was_blocked);
766 } 767 }
767 } 768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698