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

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

Issue 11316292: Add app.window.setIcon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/extensions/shell_window_registry.h" 5 #include "chrome/browser/extensions/shell_window_registry.h"
6 #include "chrome/browser/profiles/profile_dependency_manager.h" 6 #include "chrome/browser/profiles/profile_dependency_manager.h"
7 #include "chrome/browser/ui/extensions/shell_window.h" 7 #include "chrome/browser/ui/extensions/shell_window.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "content/public/browser/notification_types.h" 9 #include "content/public/browser/notification_types.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // static 50 // static
51 ShellWindowRegistry* ShellWindowRegistry::Get(Profile* profile) { 51 ShellWindowRegistry* ShellWindowRegistry::Get(Profile* profile) {
52 return Factory::GetForProfile(profile); 52 return Factory::GetForProfile(profile);
53 } 53 }
54 54
55 void ShellWindowRegistry::AddShellWindow(ShellWindow* shell_window) { 55 void ShellWindowRegistry::AddShellWindow(ShellWindow* shell_window) {
56 shell_windows_.insert(shell_window); 56 shell_windows_.insert(shell_window);
57 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowAdded(shell_window)); 57 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowAdded(shell_window));
58 } 58 }
59 59
60 void ShellWindowRegistry::UpdateShellWindow(ShellWindow* shell_window) {
61 shell_windows_.insert(shell_window);
62 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowUpdated(shell_window));
63 }
64
60 void ShellWindowRegistry::RemoveShellWindow(ShellWindow* shell_window) { 65 void ShellWindowRegistry::RemoveShellWindow(ShellWindow* shell_window) {
61 shell_windows_.erase(shell_window); 66 shell_windows_.erase(shell_window);
62 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowRemoved(shell_window)); 67 FOR_EACH_OBSERVER(Observer, observers_, OnShellWindowRemoved(shell_window));
63 } 68 }
64 69
65 void ShellWindowRegistry::AddObserver(Observer* observer) { 70 void ShellWindowRegistry::AddObserver(Observer* observer) {
66 observers_.AddObserver(observer); 71 observers_.AddObserver(observer);
67 } 72 }
68 73
69 void ShellWindowRegistry::RemoveObserver(Observer* observer) { 74 void ShellWindowRegistry::RemoveObserver(Observer* observer) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 182
178 bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() const { 183 bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() const {
179 return true; 184 return true;
180 } 185 }
181 186
182 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const { 187 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const {
183 return false; 188 return false;
184 } 189 }
185 190
186 } // namespace extensions 191 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698