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

Side by Side Diff: chrome/browser/browser_window.h

Issue 10896: Re-do the way browser windows are shown:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_BROWSER_WINDOW_H_ 5 #ifndef CHROME_BROWSER_BROWSER_WINDOW_H_
6 #define CHROME_BROWSER_BROWSER_WINDOW_H_ 6 #define CHROME_BROWSER_BROWSER_WINDOW_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/gfx/point.h" 10 #include "base/gfx/point.h"
(...skipping 17 matching lines...) Expand all
28 28
29 //////////////////////////////////////////////////////////////////////////////// 29 ////////////////////////////////////////////////////////////////////////////////
30 // BrowserWindow interface 30 // BrowserWindow interface
31 // An interface implemented by the "view" of the Browser window. 31 // An interface implemented by the "view" of the Browser window.
32 // 32 //
33 class BrowserWindow { 33 class BrowserWindow {
34 public: 34 public:
35 // Initialize the frame. 35 // Initialize the frame.
36 virtual void Init() = 0; 36 virtual void Init() = 0;
37 37
38 // Show the window according to the given command, which is one of SW_* 38 // Show the window, or activates it if it's already visible.
39 // passed to the Windows function ShowWindow. 39 virtual void Show() = 0;
40 //
41 // If adjust_to_fit is true, the window is resized and moved to be on the
42 // default screen.
43 virtual void Show(int command, bool adjust_to_fit) = 0;
44 40
45 // Closes the frame as soon as possible. If the frame is not in a drag 41 // Closes the frame as soon as possible. If the frame is not in a drag
46 // session, it will close immediately; otherwise, it will move offscreen (so 42 // session, it will close immediately; otherwise, it will move offscreen (so
47 // events are still fired) until the drag ends, then close. 43 // events are still fired) until the drag ends, then close.
48 virtual void Close() = 0; 44 virtual void Close() = 0;
49 45
50 // Activates (brings to front) the window. Restores the window from minimized 46 // Activates (brings to front) the window. Restores the window from minimized
51 // state if necessary. 47 // state if necessary.
52 virtual void Activate() = 0; 48 virtual void Activate() = 0;
53 49
(...skipping 24 matching lines...) Expand all
78 74
79 // Updates internal state specifying whether the throbber is to be shown. 75 // Updates internal state specifying whether the throbber is to be shown.
80 // If the throbber was shown, and should still be shown, the frame of the 76 // If the throbber was shown, and should still be shown, the frame of the
81 // throbber is advanced. 77 // throbber is advanced.
82 // If necessary, the appropriate painting is scheduled. 78 // If necessary, the appropriate painting is scheduled.
83 virtual void ValidateThrobber() { } 79 virtual void ValidateThrobber() { }
84 80
85 // TODO(beng): RENAME (GetRestoredBounds) 81 // TODO(beng): RENAME (GetRestoredBounds)
86 // Returns the nonmaximized bounds of the frame (even if the frame is 82 // Returns the nonmaximized bounds of the frame (even if the frame is
87 // currently maximized or minimized) in terms of the screen coordinates. 83 // currently maximized or minimized) in terms of the screen coordinates.
88 virtual gfx::Rect GetNormalBounds() = 0; 84 virtual gfx::Rect GetNormalBounds() const = 0;
89 85
90 // TODO(beng): REMOVE? 86 // TODO(beng): REMOVE?
91 // Returns true if the frame is maximized (aka zoomed). 87 // Returns true if the frame is maximized (aka zoomed).
92 virtual bool IsMaximized() = 0; 88 virtual bool IsMaximized() = 0;
93 89
94 // Returns the star button. 90 // Returns the star button.
95 virtual ToolbarStarToggle* GetStarButton() const = 0; 91 virtual ToolbarStarToggle* GetStarButton() const = 0;
96 92
97 // Returns the location bar. 93 // Returns the location bar.
98 virtual LocationBarView* GetLocationBarView() const = 0; 94 virtual LocationBarView* GetLocationBarView() const = 0;
99 95
100 // Returns the go button. 96 // Returns the go button.
101 virtual GoButton* GetGoButton() const = 0; 97 virtual GoButton* GetGoButton() const = 0;
102 98
103 // Returns the Bookmark Bar view. 99 // Returns the Bookmark Bar view.
104 virtual BookmarkBarView* GetBookmarkBarView() = 0; 100 virtual BookmarkBarView* GetBookmarkBarView() = 0;
105 101
106 // Updates the toolbar with the state for the specified |contents|. 102 // Updates the toolbar with the state for the specified |contents|.
107 virtual void UpdateToolbar(TabContents* contents, 103 virtual void UpdateToolbar(TabContents* contents,
108 bool should_restore_state) = 0; 104 bool should_restore_state) = 0;
109 105
110 // Focuses the toolbar (for accessibility). 106 // Focuses the toolbar (for accessibility).
111 virtual void FocusToolbar() = 0; 107 virtual void FocusToolbar() = 0;
112 108
113 // Returns whether the bookmark bar is visible or not. 109 // Returns whether the bookmark bar is visible or not.
114 virtual bool IsBookmarkBarVisible() const = 0; 110 virtual bool IsBookmarkBarVisible() const = 0;
115 111
116 // Construct a BrowserWindow implementation for the specified |browser|. 112 // Construct a BrowserWindow implementation for the specified |browser|.
117 static BrowserWindow* CreateBrowserWindow(Browser* browser, 113 static BrowserWindow* CreateBrowserWindow(Browser* browser);
118 const gfx::Rect& bounds,
119 int show_command);
120 114
121 protected: 115 protected:
122 friend class BrowserList; 116 friend class BrowserList;
123 friend class BrowserView; 117 friend class BrowserView;
124 virtual void DestroyBrowser() = 0; 118 virtual void DestroyBrowser() = 0;
125 }; 119 };
126 120
127 #endif // CHROME_BROWSER_BROWSER_WINDOW_H__ 121 #endif // CHROME_BROWSER_BROWSER_WINDOW_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698