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

Side by Side Diff: apps/shell_window.h

Issue 21444002: Do not restore corrupt cached app window bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | apps/shell_window.cc » ('j') | apps/shell_window_geometry_cache.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 content::WebContents* web_contents) OVERRIDE; 298 content::WebContents* web_contents) OVERRIDE;
299 299
300 // Helper method to add a message to the renderer's DevTools console. 300 // Helper method to add a message to the renderer's DevTools console.
301 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level, 301 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level,
302 const std::string& message); 302 const std::string& message);
303 303
304 // Saves the window geometry/position/screen bounds. 304 // Saves the window geometry/position/screen bounds.
305 void SaveWindowPosition(); 305 void SaveWindowPosition();
306 306
307 // Helper method to adjust the cached bounds so that we can make sure it can 307 // Helper method to adjust the cached bounds so that we can make sure it can
308 // be visible on the screen. See http://crbug.com/145752 . 308 // be visible on the screen.
309 void AdjustBoundsToBeVisibleOnScreen( 309 void AdjustBoundsToBeVisibleOnScreen(
310 const gfx::Rect& cached_bounds, 310 const gfx::Rect& cached_bounds,
311 const gfx::Rect& cached_screen_bounds, 311 const gfx::Rect& cached_screen_bounds,
312 const gfx::Rect& current_screen_bounds,
313 const gfx::Size& minimum_size, 312 const gfx::Size& minimum_size,
314 gfx::Rect* bounds) const; 313 gfx::Rect* bounds) const;
315 314
316 // Load the app's image, firing a load state change when loaded. 315 // Load the app's image, firing a load state change when loaded.
317 void UpdateExtensionAppIcon(); 316 void UpdateExtensionAppIcon();
318 317
319 void OnImageLoaded(const gfx::Image& image); 318 void OnImageLoaded(const gfx::Image& image);
320 319
321 // extensions::ExtensionKeybindingRegistry::Delegate implementation. 320 // extensions::ExtensionKeybindingRegistry::Delegate implementation.
322 virtual extensions::ActiveTabPermissionGranter* 321 virtual extensions::ActiveTabPermissionGranter*
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 bool fullscreen_for_window_api_; 362 bool fullscreen_for_window_api_;
364 // Fullscreen entered by HTML requestFullscreen. 363 // Fullscreen entered by HTML requestFullscreen.
365 bool fullscreen_for_tab_; 364 bool fullscreen_for_tab_;
366 365
367 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 366 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
368 }; 367 };
369 368
370 } // namespace apps 369 } // namespace apps
371 370
372 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 371 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | apps/shell_window.cc » ('j') | apps/shell_window_geometry_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698