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

Side by Side Diff: chrome/browser/background/background_contents_service.cc

Issue 89243003: Move EmptyString, kWhitespace and the BOM to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 return (it != contents_map_.end()) ? it->second.contents : NULL; 741 return (it != contents_map_.end()) ? it->second.contents : NULL;
742 } 742 }
743 743
744 const string16& BackgroundContentsService::GetParentApplicationId( 744 const string16& BackgroundContentsService::GetParentApplicationId(
745 BackgroundContents* contents) const { 745 BackgroundContents* contents) const {
746 for (BackgroundContentsMap::const_iterator it = contents_map_.begin(); 746 for (BackgroundContentsMap::const_iterator it = contents_map_.begin();
747 it != contents_map_.end(); ++it) { 747 it != contents_map_.end(); ++it) {
748 if (contents == it->second.contents) 748 if (contents == it->second.contents)
749 return it->first; 749 return it->first;
750 } 750 }
751 return EmptyString16(); 751 return base::EmptyString16();
752 } 752 }
753 753
754 void BackgroundContentsService::AddWebContents( 754 void BackgroundContentsService::AddWebContents(
755 WebContents* new_contents, 755 WebContents* new_contents,
756 WindowOpenDisposition disposition, 756 WindowOpenDisposition disposition,
757 const gfx::Rect& initial_pos, 757 const gfx::Rect& initial_pos,
758 bool user_gesture, 758 bool user_gesture,
759 bool* was_blocked) { 759 bool* was_blocked) {
760 Browser* browser = chrome::FindLastActiveWithProfile( 760 Browser* browser = chrome::FindLastActiveWithProfile(
761 Profile::FromBrowserContext(new_contents->GetBrowserContext()), 761 Profile::FromBrowserContext(new_contents->GetBrowserContext()),
762 chrome::GetActiveDesktop()); 762 chrome::GetActiveDesktop());
763 if (browser) { 763 if (browser) {
764 chrome::AddWebContents(browser, NULL, new_contents, disposition, 764 chrome::AddWebContents(browser, NULL, new_contents, disposition,
765 initial_pos, user_gesture, was_blocked); 765 initial_pos, user_gesture, was_blocked);
766 } 766 }
767 } 767 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.cc ('k') | chrome/browser/chromeos/imageburner/burn_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698