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

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

Issue 10825016: Fixed coverity defects regarding pass-by-value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed non-compiling code caused by neglect to update header file Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/shell_window_registry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // a convenience wrapper around ShellWindowRegistryFactory::GetForProfile. 51 // a convenience wrapper around ShellWindowRegistryFactory::GetForProfile.
52 static ShellWindowRegistry* Get(Profile* profile); 52 static ShellWindowRegistry* Get(Profile* profile);
53 53
54 void AddShellWindow(ShellWindow* shell_window); 54 void AddShellWindow(ShellWindow* shell_window);
55 void RemoveShellWindow(ShellWindow* shell_window); 55 void RemoveShellWindow(ShellWindow* shell_window);
56 56
57 void AddObserver(Observer* observer); 57 void AddObserver(Observer* observer);
58 void RemoveObserver(Observer* observer); 58 void RemoveObserver(Observer* observer);
59 59
60 // Returns a set of windows owned by the application identified by app_id. 60 // Returns a set of windows owned by the application identified by app_id.
61 ShellWindowSet GetShellWindowsForApp(const std::string app_id) const; 61 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const;
62 const ShellWindowSet& shell_windows() const { return shell_windows_; } 62 const ShellWindowSet& shell_windows() const { return shell_windows_; }
63 63
64 // Helper functions to find shell windows with particular attributes. 64 // Helper functions to find shell windows with particular attributes.
65 ShellWindow* GetShellWindowForRenderViewHost( 65 ShellWindow* GetShellWindowForRenderViewHost(
66 content::RenderViewHost* render_view_host) const; 66 content::RenderViewHost* render_view_host) const;
67 ShellWindow* GetShellWindowForNativeWindow(gfx::NativeWindow window) const; 67 ShellWindow* GetShellWindowForNativeWindow(gfx::NativeWindow window) const;
68 68
69 private: 69 private:
70 class Factory : public ProfileKeyedServiceFactory { 70 class Factory : public ProfileKeyedServiceFactory {
71 public: 71 public:
(...skipping 11 matching lines...) Expand all
83 Profile* profile) const OVERRIDE; 83 Profile* profile) const OVERRIDE;
84 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; 84 virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
85 virtual bool ServiceIsNULLWhileTesting() OVERRIDE; 85 virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
86 }; 86 };
87 87
88 ShellWindowSet shell_windows_; 88 ShellWindowSet shell_windows_;
89 ObserverList<Observer> observers_; 89 ObserverList<Observer> observers_;
90 }; 90 };
91 91
92 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ 92 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/shell_window_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698