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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.h

Issue 10443075: Coverity PASS_BY_VALUE fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 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 #ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" 10 #include "chrome/browser/extensions/extension_function_dispatcher.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Frame frame; 48 Frame frame;
49 // Specify the initial bounds of the window. If empty, the window will be a 49 // Specify the initial bounds of the window. If empty, the window will be a
50 // default size. 50 // default size.
51 gfx::Rect bounds; 51 gfx::Rect bounds;
52 gfx::Size minimum_size; 52 gfx::Size minimum_size;
53 }; 53 };
54 54
55 static ShellWindow* Create(Profile* profile, 55 static ShellWindow* Create(Profile* profile,
56 const extensions::Extension* extension, 56 const extensions::Extension* extension,
57 const GURL& url, 57 const GURL& url,
58 const CreateParams params); 58 const CreateParams& params);
59 59
60 const SessionID& session_id() const { return session_id_; } 60 const SessionID& session_id() const { return session_id_; }
61 const extensions::Extension* extension() const { return extension_; } 61 const extensions::Extension* extension() const { return extension_; }
62 content::WebContents* web_contents() const { return web_contents_; } 62 content::WebContents* web_contents() const { return web_contents_; }
63 63
64 protected: 64 protected:
65 ShellWindow(Profile* profile, 65 ShellWindow(Profile* profile,
66 const extensions::Extension* extension, 66 const extensions::Extension* extension,
67 const GURL& url); 67 const GURL& url);
68 virtual ~ShellWindow(); 68 virtual ~ShellWindow();
(...skipping 13 matching lines...) Expand all
82 82
83 private: 83 private:
84 // PlatformAppBrowserTest needs access to web_contents() 84 // PlatformAppBrowserTest needs access to web_contents()
85 friend class PlatformAppBrowserTest; 85 friend class PlatformAppBrowserTest;
86 86
87 // Instantiates a platform-specific ShellWindow subclass (one implementation 87 // Instantiates a platform-specific ShellWindow subclass (one implementation
88 // per platform). Public users of ShellWindow should use ShellWindow::Create. 88 // per platform). Public users of ShellWindow should use ShellWindow::Create.
89 static ShellWindow* CreateImpl(Profile* profile, 89 static ShellWindow* CreateImpl(Profile* profile,
90 const extensions::Extension* extension, 90 const extensions::Extension* extension,
91 const GURL& url, 91 const GURL& url,
92 CreateParams params); 92 const CreateParams& params);
93 93
94 // content::WebContentsObserver implementation. 94 // content::WebContentsObserver implementation.
95 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 95 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
96 96
97 // content::WebContentsDelegate implementation. 97 // content::WebContentsDelegate implementation.
98 virtual void CloseContents(content::WebContents* contents) OVERRIDE; 98 virtual void CloseContents(content::WebContents* contents) OVERRIDE;
99 virtual bool ShouldSuppressDialogs() OVERRIDE; 99 virtual bool ShouldSuppressDialogs() OVERRIDE;
100 virtual void WebIntentDispatch( 100 virtual void WebIntentDispatch(
101 content::WebContents* web_contents, 101 content::WebContents* web_contents,
102 content::WebIntentsDispatcher* intents_dispatcher) OVERRIDE; 102 content::WebIntentsDispatcher* intents_dispatcher) OVERRIDE;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 scoped_ptr<TabContents> contents_; 134 scoped_ptr<TabContents> contents_;
135 // web_contents_ is owned by contents_. 135 // web_contents_ is owned by contents_.
136 content::WebContents* web_contents_; 136 content::WebContents* web_contents_;
137 content::NotificationRegistrar registrar_; 137 content::NotificationRegistrar registrar_;
138 ExtensionFunctionDispatcher extension_function_dispatcher_; 138 ExtensionFunctionDispatcher extension_function_dispatcher_;
139 139
140 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 140 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
141 }; 141 };
142 142
143 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 143 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698