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

Side by Side Diff: trunk/src/chrome/browser/extensions/shell_window_registry.cc

Issue 22356002: Revert 215745 "Fix crash when reloading packaged app. " (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | 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 "apps/shell_window.h" 5 #include "apps/shell_window.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/shell_window_registry.h" 7 #include "chrome/browser/extensions/shell_window_registry.h"
8 #include "chrome/browser/profiles/incognito_helpers.h" 8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/extensions/native_app_window.h" 10 #include "chrome/browser/ui/extensions/native_app_window.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 void ShellWindowRegistry::ShellWindowActivated(ShellWindow* shell_window) { 80 void ShellWindowRegistry::ShellWindowActivated(ShellWindow* shell_window) {
81 BringToFront(shell_window); 81 BringToFront(shell_window);
82 } 82 }
83 83
84 void ShellWindowRegistry::RemoveShellWindow(ShellWindow* shell_window) { 84 void ShellWindowRegistry::RemoveShellWindow(ShellWindow* shell_window) {
85 const ShellWindowList::iterator it = std::find(shell_windows_.begin(), 85 const ShellWindowList::iterator it = std::find(shell_windows_.begin(),
86 shell_windows_.end(), 86 shell_windows_.end(),
87 shell_window); 87 shell_window);
88 if (it != shell_windows_.end()) { 88 if (it != shell_windows_.end())
89 shell_windows_.erase(it); 89 shell_windows_.erase(it);
90 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowRemoved(shell_window)); 90 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowRemoved(shell_window));
91 }
92 } 91 }
93 92
94 void ShellWindowRegistry::AddObserver(Observer* observer) { 93 void ShellWindowRegistry::AddObserver(Observer* observer) {
95 observers_.AddObserver(observer); 94 observers_.AddObserver(observer);
96 } 95 }
97 96
98 void ShellWindowRegistry::RemoveObserver(Observer* observer) { 97 void ShellWindowRegistry::RemoveObserver(Observer* observer) {
99 observers_.RemoveObserver(observer); 98 observers_.RemoveObserver(observer);
100 } 99 }
101 100
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const { 297 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const {
299 return false; 298 return false;
300 } 299 }
301 300
302 content::BrowserContext* ShellWindowRegistry::Factory::GetBrowserContextToUse( 301 content::BrowserContext* ShellWindowRegistry::Factory::GetBrowserContextToUse(
303 content::BrowserContext* context) const { 302 content::BrowserContext* context) const {
304 return chrome::GetBrowserContextRedirectedInIncognito(context); 303 return chrome::GetBrowserContextRedirectedInIncognito(context);
305 } 304 }
306 305
307 } // namespace extensions 306 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698