| OLD | NEW |
| 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 Loading... |
| 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/work_area. |
| 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 AdjustBoundsToBeVisibleOnMonitorContaining( |
| 269 const gfx::Rect& cached_bounds, |
| 270 const gfx::Rect& cached_work_area, |
| 271 gfx::Rect* bounds) const; |
| 272 |
| 266 // Load the app's image, firing a load state change when loaded. | 273 // Load the app's image, firing a load state change when loaded. |
| 267 void UpdateExtensionAppIcon(); | 274 void UpdateExtensionAppIcon(); |
| 268 | 275 |
| 269 void OnImageLoaded(const gfx::Image& image); | 276 void OnImageLoaded(const gfx::Image& image); |
| 270 | 277 |
| 271 // extensions::ExtensionKeybindingRegistry::Delegate implementation. | 278 // extensions::ExtensionKeybindingRegistry::Delegate implementation. |
| 272 virtual extensions::ActiveTabPermissionGranter* | 279 virtual extensions::ActiveTabPermissionGranter* |
| 273 GetActiveTabPermissionGranter() OVERRIDE; | 280 GetActiveTabPermissionGranter() OVERRIDE; |
| 274 | 281 |
| 275 // web_modal::WebContentsModalDialogManagerDelegate implementation. | 282 // web_modal::WebContentsModalDialogManagerDelegate implementation. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 317 |
| 311 // Fullscreen entered by app.window api. | 318 // Fullscreen entered by app.window api. |
| 312 bool fullscreen_for_window_api_; | 319 bool fullscreen_for_window_api_; |
| 313 // Fullscreen entered by HTML requestFullscreen. | 320 // Fullscreen entered by HTML requestFullscreen. |
| 314 bool fullscreen_for_tab_; | 321 bool fullscreen_for_tab_; |
| 315 | 322 |
| 316 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 323 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 317 }; | 324 }; |
| 318 | 325 |
| 319 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 326 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |