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

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

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 #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 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/extensions/extension_keybinding_registry.h" 10 #include "chrome/browser/extensions/extension_keybinding_registry.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // content::NotificationObserver implementation. 254 // content::NotificationObserver implementation.
255 virtual void Observe(int type, 255 virtual void Observe(int type,
256 const content::NotificationSource& source, 256 const content::NotificationSource& source,
257 const content::NotificationDetails& details) OVERRIDE; 257 const content::NotificationDetails& details) OVERRIDE;
258 258
259 // Helper method to add a message to the renderer's DevTools console. 259 // Helper method to add a message to the renderer's DevTools console.
260 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level, 260 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level,
261 const std::string& message); 261 const std::string& message);
262 262
263 // Saves the window geometry/position. 263 // Saves the window geometry/position/screen bounds.
264 void SaveWindowPosition(); 264 void SaveWindowPosition();
265 265
266 // Helper method to adjust the cached bounds so that we can make sure it can
267 // be visible on the screen. See http://crbug.com/145752 .
268 void AdjustBoundsToBeVisibleOnScreen(
269 const gfx::Rect& cached_bounds,
270 const gfx::Rect& cached_screen_bounds,
271 const gfx::Rect& current_screen_bounds,
272 const gfx::Size& minimum_size,
273 gfx::Rect* bounds) const;
274
266 // Load the app's image, firing a load state change when loaded. 275 // Load the app's image, firing a load state change when loaded.
267 void UpdateExtensionAppIcon(); 276 void UpdateExtensionAppIcon();
268 277
269 void OnImageLoaded(const gfx::Image& image); 278 void OnImageLoaded(const gfx::Image& image);
270 279
271 // extensions::ExtensionKeybindingRegistry::Delegate implementation. 280 // extensions::ExtensionKeybindingRegistry::Delegate implementation.
272 virtual extensions::ActiveTabPermissionGranter* 281 virtual extensions::ActiveTabPermissionGranter*
273 GetActiveTabPermissionGranter() OVERRIDE; 282 GetActiveTabPermissionGranter() OVERRIDE;
274 283
275 // web_modal::WebContentsModalDialogManagerDelegate implementation. 284 // web_modal::WebContentsModalDialogManagerDelegate implementation.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 319
311 // Fullscreen entered by app.window api. 320 // Fullscreen entered by app.window api.
312 bool fullscreen_for_window_api_; 321 bool fullscreen_for_window_api_;
313 // Fullscreen entered by HTML requestFullscreen. 322 // Fullscreen entered by HTML requestFullscreen.
314 bool fullscreen_for_tab_; 323 bool fullscreen_for_tab_;
315 324
316 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 325 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
317 }; 326 };
318 327
319 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 328 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest_util.cc ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698