OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 int GetShowState() const; | 109 int GetShowState() const; |
110 | 110 |
111 // Called by the frame to notify the BrowserView that it was moved, and that | 111 // Called by the frame to notify the BrowserView that it was moved, and that |
112 // any dependent popup windows should be repositioned. | 112 // any dependent popup windows should be repositioned. |
113 void WindowMoved(); | 113 void WindowMoved(); |
114 | 114 |
115 // Called by the frame to notify the BrowserView that a move or resize was | 115 // Called by the frame to notify the BrowserView that a move or resize was |
116 // initiated. | 116 // initiated. |
117 void WindowMoveOrResizeStarted(); | 117 void WindowMoveOrResizeStarted(); |
118 | 118 |
119 // Returns the bounds of the toolbar, in BrowserView coordinates. | 119 // Returns the apparent bounds of the toolbar, in BrowserView coordinates. |
| 120 // These differ from |toolbar_.bounds()| in that they match where the toolbar |
| 121 // background image is drawn -- slightly outside the "true" bounds |
| 122 // horizontally, and, when using vertical tabs, behind the tab column. |
120 gfx::Rect GetToolbarBounds() const; | 123 gfx::Rect GetToolbarBounds() const; |
121 | 124 |
122 // Returns the bounds of the content area, in the coordinates of the | 125 // Returns the bounds of the content area, in the coordinates of the |
123 // BrowserView's parent. | 126 // BrowserView's parent. |
124 gfx::Rect GetClientAreaBounds() const; | 127 gfx::Rect GetClientAreaBounds() const; |
125 | 128 |
126 // Returns true if the Find Bar should be rendered such that it appears to | 129 // Returns true if the Find Bar should be rendered such that it appears to |
127 // blend with the Bookmarks Bar. False if it should appear to blend with the | 130 // blend with the Bookmarks Bar. False if it should appear to blend with the |
128 // main Toolbar. The return value will vary depending on whether or not the | 131 // main Toolbar. The return value will vary depending on whether or not the |
129 // Bookmark Bar is always shown. | 132 // Bookmark Bar is always shown. |
130 bool ShouldFindBarBlendWithBookmarksBar() const; | 133 bool ShouldFindBarBlendWithBookmarksBar() const; |
131 | 134 |
132 // Returns the constraining bounding box that should be used to lay out the | 135 // Returns the constraining bounding box that should be used to lay out the |
133 // FindBar within. This is _not_ the size of the find bar, just the bounding | 136 // FindBar within. This is _not_ the size of the find bar, just the bounding |
134 // box it should be laid out within. The coordinate system of the returned | 137 // box it should be laid out within. The coordinate system of the returned |
135 // rect is in the coordinate system of the frame, since the FindBar is a child | 138 // rect is in the coordinate system of the frame, since the FindBar is a child |
136 // window. | 139 // window. |
137 gfx::Rect GetFindBarBoundingBox() const; | 140 gfx::Rect GetFindBarBoundingBox() const; |
138 | 141 |
139 // Returns the preferred height of the TabStrip. Used to position the OTR | 142 // Returns the preferred height of the TabStrip. Used to position the OTR |
140 // avatar icon. | 143 // avatar icon. |
141 int GetTabStripHeight() const; | 144 int GetTabStripHeight() const; |
142 | 145 |
143 // Returns the bounds of the TabStrip. Used by themed views to determine the | 146 // Takes some view's origin (relative to this BrowserView) and offsets it such |
144 // offset of IDR_THEME_TOOLBAR. | 147 // that it can be used as the source origin for seamlessly tiling the toolbar |
145 gfx::Rect GetTabStripBounds() const; | 148 // background image over that view. |
| 149 gfx::Point OffsetPointForToolbarBackgroundImage( |
| 150 const gfx::Point& point) const; |
146 | 151 |
147 // Accessor for the TabStrip. | 152 // Accessor for the TabStrip. |
148 BaseTabStrip* tabstrip() const { return tabstrip_; } | 153 BaseTabStrip* tabstrip() const { return tabstrip_; } |
149 | 154 |
150 // Accessor for the Toolbar. | 155 // Accessor for the Toolbar. |
151 ToolbarView* toolbar() const { return toolbar_; } | 156 ToolbarView* toolbar() const { return toolbar_; } |
152 | 157 |
153 // Returns true if various window components are visible. | 158 // Returns true if various window components are visible. |
154 bool IsTabStripVisible() const; | 159 bool IsTabStripVisible() const; |
155 | 160 |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 593 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
589 | 594 |
590 scoped_ptr<AccessibleViewHelper> accessible_view_helper_; | 595 scoped_ptr<AccessibleViewHelper> accessible_view_helper_; |
591 | 596 |
592 NotificationRegistrar registrar_; | 597 NotificationRegistrar registrar_; |
593 | 598 |
594 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 599 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
595 }; | 600 }; |
596 | 601 |
597 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 602 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |