OLD | NEW |
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 CONTENT_SHELL_SHELL_H_ | 5 #ifndef CONTENT_SHELL_SHELL_H_ |
6 #define CONTENT_SHELL_SHELL_H_ | 6 #define CONTENT_SHELL_SHELL_H_ |
7 | 7 |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 static Shell* CreateNewWindow(content::BrowserContext* browser_context, | 58 static Shell* CreateNewWindow(content::BrowserContext* browser_context, |
59 const GURL& url, | 59 const GURL& url, |
60 SiteInstance* site_instance, | 60 SiteInstance* site_instance, |
61 int routing_id, | 61 int routing_id, |
62 WebContents* base_web_contents); | 62 WebContents* base_web_contents); |
63 | 63 |
64 // Returns the Shell object corresponding to the given RenderViewHost. | 64 // Returns the Shell object corresponding to the given RenderViewHost. |
65 static Shell* FromRenderViewHost(RenderViewHost* rvh); | 65 static Shell* FromRenderViewHost(RenderViewHost* rvh); |
66 | 66 |
| 67 // Returns the currently open windows. |
| 68 static std::vector<Shell*>& windows() { return windows_; } |
| 69 |
67 // Closes all windows and returns. This runs a message loop. | 70 // Closes all windows and returns. This runs a message loop. |
68 static void CloseAllWindows(); | 71 static void CloseAllWindows(); |
69 | 72 |
70 // Closes all windows and exits. | 73 // Closes all windows and exits. |
71 static void PlatformExit(); | 74 static void PlatformExit(); |
72 | 75 |
73 WebContents* web_contents() const { return web_contents_.get(); } | 76 WebContents* web_contents() const { return web_contents_.get(); } |
74 | 77 |
75 #if defined(OS_MACOSX) | 78 #if defined(OS_MACOSX) |
76 // Public to be called by an ObjC bridge object. | 79 // Public to be called by an ObjC bridge object. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 static std::vector<Shell*> windows_; | 196 static std::vector<Shell*> windows_; |
194 | 197 |
195 // True if the destructur of Shell should post a quit closure on the current | 198 // True if the destructur of Shell should post a quit closure on the current |
196 // message loop if the destructed Shell object was the last one. | 199 // message loop if the destructed Shell object was the last one. |
197 static bool quit_message_loop_; | 200 static bool quit_message_loop_; |
198 }; | 201 }; |
199 | 202 |
200 } // namespace content | 203 } // namespace content |
201 | 204 |
202 #endif // CONTENT_SHELL_SHELL_H_ | 205 #endif // CONTENT_SHELL_SHELL_H_ |
OLD | NEW |