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

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

Issue 11193049: Add the app.windows.getBounds method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased against head Created 8 years, 1 month 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 | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_keybinding_registry.h" 10 #include "chrome/browser/extensions/extension_keybinding_registry.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 // NativeShellWindows should call this to determine what the window's title 99 // NativeShellWindows should call this to determine what the window's title
100 // is on startup and from within UpdateWindowTitle(). 100 // is on startup and from within UpdateWindowTitle().
101 virtual string16 GetTitle() const; 101 virtual string16 GetTitle() const;
102 102
103 // Call to notify ShellRegistry and delete the window. Subclasses should 103 // Call to notify ShellRegistry and delete the window. Subclasses should
104 // invoke this method instead of using "delete this". 104 // invoke this method instead of using "delete this".
105 void OnNativeClose(); 105 void OnNativeClose();
106 106
107 // Save the window position in the prefs. 107 // Should be called by native implementations when the window size/position
108 virtual void SaveWindowPosition(); 108 // has changed.
109 void SaveWindowPosition();
109 110
110 protected: 111 protected:
111 ShellWindow(Profile* profile, 112 ShellWindow(Profile* profile,
112 const extensions::Extension* extension); 113 const extensions::Extension* extension);
113 virtual ~ShellWindow(); 114 virtual ~ShellWindow();
114 115
115 private: 116 private:
116 // PlatformAppBrowserTest needs access to web_contents() 117 // PlatformAppBrowserTest needs access to web_contents()
117 friend class extensions::PlatformAppBrowserTest; 118 friend class extensions::PlatformAppBrowserTest;
118 119
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 virtual extensions::WindowController* GetExtensionWindowController() const 169 virtual extensions::WindowController* GetExtensionWindowController() const
169 OVERRIDE; 170 OVERRIDE;
170 171
171 // Message handlers. 172 // Message handlers.
172 void OnRequest(const ExtensionHostMsg_Request_Params& params); 173 void OnRequest(const ExtensionHostMsg_Request_Params& params);
173 174
174 // Helper method to add a message to the renderer's DevTools console. 175 // Helper method to add a message to the renderer's DevTools console.
175 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level, 176 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level,
176 const std::string& message); 177 const std::string& message);
177 178
179 // Sends an update message with the current bounds to the renderer.
180 void SendBoundsUpdate();
181
178 virtual void UpdateDraggableRegions( 182 virtual void UpdateDraggableRegions(
179 const std::vector<extensions::DraggableRegion>& regions); 183 const std::vector<extensions::DraggableRegion>& regions);
180 184
181 // Load the app's image, firing a load state change when loaded. 185 // Load the app's image, firing a load state change when loaded.
182 void UpdateExtensionAppIcon(); 186 void UpdateExtensionAppIcon();
183 187
184 // ImageLoadingTracker::Observer implementation. 188 // ImageLoadingTracker::Observer implementation.
185 virtual void OnImageLoaded(const gfx::Image& image, 189 virtual void OnImageLoaded(const gfx::Image& image,
186 const std::string& extension_id, 190 const std::string& extension_id,
187 int index) OVERRIDE; 191 int index) OVERRIDE;
(...skipping 20 matching lines...) Expand all
208 212
209 // Used for loading app_icon_. 213 // Used for loading app_icon_.
210 scoped_ptr<ImageLoadingTracker> app_icon_loader_; 214 scoped_ptr<ImageLoadingTracker> app_icon_loader_;
211 215
212 scoped_ptr<NativeShellWindow> native_window_; 216 scoped_ptr<NativeShellWindow> native_window_;
213 217
214 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 218 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
215 }; 219 };
216 220
217 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 221 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698