OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |