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

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

Issue 17378003: [WIN]Save work area of window and adjust bounds to ensure it fit on screen before show. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update to windows only. Created 7 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
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/platform_app_browsertest_util.h" 5 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/extensions/api/tabs/tabs_api.h" 9 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
10 #include "chrome/browser/extensions/extension_function_test_utils.h" 10 #include "chrome/browser/extensions/extension_function_test_utils.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) { 158 void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) {
159 content::WindowedNotificationObserver destroyed_observer( 159 content::WindowedNotificationObserver destroyed_observer(
160 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 160 content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
161 content::NotificationService::AllSources()); 161 content::NotificationService::AllSources());
162 window->GetBaseWindow()->Close(); 162 window->GetBaseWindow()->Close();
163 destroyed_observer.Wait(); 163 destroyed_observer.Wait();
164 } 164 }
165 165
166 void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForShellWinow(
167 ShellWindow* window,
168 const gfx::Rect& cached_bounds,
169 const gfx::Rect& cached_screen_bounds,
170 const gfx::Rect& current_screen_bounds,
171 const gfx::Size& minimum_size,
172 gfx::Rect* bounds) {
173 window->AdjustBoundsToBeVisibleOnScreen(cached_bounds,
174 cached_screen_bounds,
175 current_screen_bounds,
176 minimum_size,
177 bounds);
178 }
179
166 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( 180 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine(
167 CommandLine* command_line) { 181 CommandLine* command_line) {
168 PlatformAppBrowserTest::SetUpCommandLine(command_line); 182 PlatformAppBrowserTest::SetUpCommandLine(command_line);
169 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); 183 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
170 } 184 }
171 185
172 } // namespace extensions 186 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest_util.h ('k') | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698