OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GTK_BROWSER_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // Save the window position in the prefs. | 243 // Save the window position in the prefs. |
244 virtual void SaveWindowPosition(); | 244 virtual void SaveWindowPosition(); |
245 | 245 |
246 // Sets the default size for the window and the way the user is allowed to | 246 // Sets the default size for the window and the way the user is allowed to |
247 // resize it. | 247 // resize it. |
248 virtual void SetGeometryHints(); | 248 virtual void SetGeometryHints(); |
249 | 249 |
250 // Returns |true| if we should use the custom frame. | 250 // Returns |true| if we should use the custom frame. |
251 virtual bool UseCustomFrame(); | 251 virtual bool UseCustomFrame(); |
252 | 252 |
| 253 // Called when the window size changed. |
| 254 virtual void OnSizeChanged(int width, int height); |
| 255 |
| 256 // Returns the size of the window frame around the client content area. |
| 257 gfx::Size GetNonClientFrameSize() const; |
| 258 |
253 // Top level window. | 259 // Top level window. |
254 GtkWindow* window_; | 260 GtkWindow* window_; |
255 // GtkAlignment that holds the interior components of the chromium window. | 261 // GtkAlignment that holds the interior components of the chromium window. |
256 // This is used to draw the custom frame border and content shadow. | 262 // This is used to draw the custom frame border and content shadow. |
257 GtkWidget* window_container_; | 263 GtkWidget* window_container_; |
258 // VBox that holds everything (tabs, toolbar, bookmarks bar, tab contents). | 264 // VBox that holds everything (tabs, toolbar, bookmarks bar, tab contents). |
259 GtkWidget* window_vbox_; | 265 GtkWidget* window_vbox_; |
260 // VBox that holds everything below the toolbar. | 266 // VBox that holds everything below the toolbar. |
261 GtkWidget* render_area_vbox_; | 267 GtkWidget* render_area_vbox_; |
262 // Floating container that holds the render area. It is needed to position | 268 // Floating container that holds the render area. It is needed to position |
(...skipping 23 matching lines...) Expand all Loading... |
286 // Connect to signals on |window_|. | 292 // Connect to signals on |window_|. |
287 void ConnectHandlersToSignals(); | 293 void ConnectHandlersToSignals(); |
288 | 294 |
289 // Create the various UI components. | 295 // Create the various UI components. |
290 void InitWidgets(); | 296 void InitWidgets(); |
291 | 297 |
292 // Set up background color of the window (depends on if we're incognito or | 298 // Set up background color of the window (depends on if we're incognito or |
293 // not). | 299 // not). |
294 void SetBackgroundColor(); | 300 void SetBackgroundColor(); |
295 | 301 |
296 // Called when the window size changed. | |
297 void OnSizeChanged(int width, int height); | |
298 | |
299 // Applies the window shape to if we're in custom drawing mode. | 302 // Applies the window shape to if we're in custom drawing mode. |
300 void UpdateWindowShape(int width, int height); | 303 void UpdateWindowShape(int width, int height); |
301 | 304 |
302 // Connect accelerators that aren't connected to menu items (like ctrl-o, | 305 // Connect accelerators that aren't connected to menu items (like ctrl-o, |
303 // ctrl-l, etc.). | 306 // ctrl-l, etc.). |
304 void ConnectAccelerators(); | 307 void ConnectAccelerators(); |
305 | 308 |
306 // Change whether we're showing the custom blue frame. | 309 // Change whether we're showing the custom blue frame. |
307 // Must be called once at startup. | 310 // Must be called once at startup. |
308 // Triggers relayout of the content. | 311 // Triggers relayout of the content. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 // be called. This should only be enabled in tests where the debounce timeout | 511 // be called. This should only be enabled in tests where the debounce timeout |
509 // introduces timing issues (e.g. in OmniBoxApiTest it dismisses the | 512 // introduces timing issues (e.g. in OmniBoxApiTest it dismisses the |
510 // autocomplete popup before the results can be read) and the final window | 513 // autocomplete popup before the results can be read) and the final window |
511 // position is unimportant. | 514 // position is unimportant. |
512 bool debounce_timer_disabled_; | 515 bool debounce_timer_disabled_; |
513 | 516 |
514 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 517 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
515 }; | 518 }; |
516 | 519 |
517 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 520 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
OLD | NEW |