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

Unified Diff: chrome/browser/extensions/platform_app_browsertest_util.cc

Issue 10871087: GTK implementation of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/platform_app_browsertest_util.cc
diff --git a/chrome/browser/extensions/platform_app_browsertest_util.cc b/chrome/browser/extensions/platform_app_browsertest_util.cc
index d066d302faf1de6c62feb0727c65df1442c4fa14..6910676e76d05d0e8dc28285665f7a3079d00fa3 100644
--- a/chrome/browser/extensions/platform_app_browsertest_util.cc
+++ b/chrome/browser/extensions/platform_app_browsertest_util.cc
@@ -47,13 +47,21 @@ const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp(
}
WebContents* PlatformAppBrowserTest::GetFirstShellWindowWebContents() {
+ ShellWindow* window = GetFirstShellWindow();
+ if (window)
+ return window->web_contents();
+
+ return NULL;
+}
+
+ShellWindow* PlatformAppBrowserTest::GetFirstShellWindow() {
ShellWindowRegistry* app_registry =
ShellWindowRegistry::Get(browser()->profile());
ShellWindowRegistry::const_iterator iter;
ShellWindowRegistry::ShellWindowSet shell_windows =
app_registry->shell_windows();
for (iter = shell_windows.begin(); iter != shell_windows.end(); ++iter) {
- return (*iter)->web_contents();
+ return *iter;
}
return NULL;

Powered by Google App Engine
This is Rietveld 408576698