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

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

Issue 11369237: Add a way to fetch window frame metrics from NativeShellWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change ShellWindowViews frame insets logic Created 8 years 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 struct CreateParams { 47 struct CreateParams {
48 enum Frame { 48 enum Frame {
49 FRAME_CHROME, // Chrome-style window frame. 49 FRAME_CHROME, // Chrome-style window frame.
50 FRAME_NONE, // Frameless window. 50 FRAME_NONE, // Frameless window.
51 }; 51 };
52 52
53 CreateParams(); 53 CreateParams();
54 ~CreateParams(); 54 ~CreateParams();
55 55
56 Frame frame; 56 Frame frame;
57 // Specify the initial bounds of the window. INT_MIN designates 57 // Specify the initial content bounds of the window (excluding any window
58 // 'unspecified' for any coordinate, and should be replaced with a default 58 // decorations). INT_MIN designates 'unspecified' for any coordinate, and
59 // value. 59 // should be replaced with a default value.
60 gfx::Rect bounds; 60 gfx::Rect bounds;
61 61
62 gfx::Size minimum_size; 62 gfx::Size minimum_size;
63 gfx::Size maximum_size; 63 gfx::Size maximum_size;
64 64
65 std::string window_key; 65 std::string window_key;
66 66
67 // The process ID of the process that requested the create. 67 // The process ID of the process that requested the create.
68 int32 creator_process_id; 68 int32 creator_process_id;
69 69
(...skipping 11 matching lines...) Expand all
81 static SkRegion* RawDraggableRegionsToSkRegion( 81 static SkRegion* RawDraggableRegionsToSkRegion(
82 const std::vector<extensions::DraggableRegion>& regions); 82 const std::vector<extensions::DraggableRegion>& regions);
83 83
84 const std::string& window_key() const { return window_key_; } 84 const std::string& window_key() const { return window_key_; }
85 const SessionID& session_id() const { return session_id_; } 85 const SessionID& session_id() const { return session_id_; }
86 const extensions::Extension* extension() const { return extension_; } 86 const extensions::Extension* extension() const { return extension_; }
87 content::WebContents* web_contents() const { return web_contents_.get(); } 87 content::WebContents* web_contents() const { return web_contents_.get(); }
88 Profile* profile() const { return profile_; } 88 Profile* profile() const { return profile_; }
89 const gfx::Image& app_icon() const { return app_icon_; } 89 const gfx::Image& app_icon() const { return app_icon_; }
90 90
91 BaseWindow* GetBaseWindow(); 91 NativeShellWindow* GetBaseWindow();
92 gfx::NativeWindow GetNativeWindow() { 92 gfx::NativeWindow GetNativeWindow();
93 return GetBaseWindow()->GetNativeWindow();
94 }
95 93
96 // NativeShellWindows should call this to determine what the window's title 94 // NativeShellWindows should call this to determine what the window's title
97 // is on startup and from within UpdateWindowTitle(). 95 // is on startup and from within UpdateWindowTitle().
98 virtual string16 GetTitle() const; 96 virtual string16 GetTitle() const;
99 97
100 // Call to notify ShellRegistry and delete the window. Subclasses should 98 // Call to notify ShellRegistry and delete the window. Subclasses should
101 // invoke this method instead of using "delete this". 99 // invoke this method instead of using "delete this".
102 void OnNativeClose(); 100 void OnNativeClose();
103 101
104 // Should be called by native implementations when the window size/position 102 // Should be called by native implementations when the window size/position
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 208
211 // Used for loading app_icon_. 209 // Used for loading app_icon_.
212 scoped_ptr<ImageLoadingTracker> app_icon_loader_; 210 scoped_ptr<ImageLoadingTracker> app_icon_loader_;
213 211
214 scoped_ptr<NativeShellWindow> native_window_; 212 scoped_ptr<NativeShellWindow> native_window_;
215 213
216 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 214 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
217 }; 215 };
218 216
219 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ 217 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698