OLD | NEW |
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_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 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "ui/base/gtk/gtk_signal.h" | 23 #include "ui/base/gtk/gtk_signal.h" |
24 #include "ui/base/ui_base_types.h" | 24 #include "ui/base/ui_base_types.h" |
25 #include "ui/base/x/active_window_watcher_x_observer.h" | 25 #include "ui/base/x/active_window_watcher_x_observer.h" |
26 #include "ui/base/x/x11_util.h" | 26 #include "ui/base/x/x11_util.h" |
27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
28 | 28 |
29 class BookmarkBarGtk; | 29 class BookmarkBarGtk; |
30 class Browser; | 30 class Browser; |
31 class BrowserTitlebar; | 31 class BrowserTitlebar; |
32 class BrowserToolbarGtk; | 32 class BrowserToolbarGtk; |
| 33 class DevToolsWindow; |
33 class DownloadShelfGtk; | 34 class DownloadShelfGtk; |
34 class ExtensionKeybindingRegistryGtk; | 35 class ExtensionKeybindingRegistryGtk; |
35 class FindBarGtk; | 36 class FindBarGtk; |
36 class FullscreenExitBubbleGtk; | 37 class FullscreenExitBubbleGtk; |
37 class GlobalMenuBar; | 38 class GlobalMenuBar; |
38 class InfoBarContainerGtk; | 39 class InfoBarContainerGtk; |
39 class InstantPreviewControllerGtk; | 40 class InstantPreviewControllerGtk; |
40 class LocationBar; | 41 class LocationBar; |
41 class PrefService; | 42 class PrefService; |
42 class StatusBubbleGtk; | 43 class StatusBubbleGtk; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; | 195 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; |
195 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; | 196 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; |
196 | 197 |
197 // Overridden from ExtensionKeybindingRegistry::Delegate: | 198 // Overridden from ExtensionKeybindingRegistry::Delegate: |
198 virtual extensions::ActiveTabPermissionGranter* | 199 virtual extensions::ActiveTabPermissionGranter* |
199 GetActiveTabPermissionGranter() OVERRIDE; | 200 GetActiveTabPermissionGranter() OVERRIDE; |
200 | 201 |
201 // Accessor for the tab strip. | 202 // Accessor for the tab strip. |
202 TabStripGtk* tabstrip() const { return tabstrip_.get(); } | 203 TabStripGtk* tabstrip() const { return tabstrip_.get(); } |
203 | 204 |
204 void UpdateDevToolsForContents(content::WebContents* contents); | |
205 | |
206 // Shows docked devtools. | |
207 void ShowDevToolsContainer(DevToolsDockSide dock_side); | |
208 | |
209 // Hides docked devtools. | |
210 void HideDevToolsContainer(); | |
211 | |
212 // Updates dock side orientation for the devtools. | |
213 void SetDevToolsDockSide(DevToolsDockSide side); | |
214 | |
215 void OnDebouncedBoundsChanged(); | 205 void OnDebouncedBoundsChanged(); |
216 | 206 |
217 // Request the underlying window to unmaximize. | 207 // Request the underlying window to unmaximize. |
218 void UnMaximize(); | 208 void UnMaximize(); |
219 | 209 |
220 // Returns false if we're not ready to close yet. E.g., a tab may have an | 210 // Returns false if we're not ready to close yet. E.g., a tab may have an |
221 // onbeforeunload handler that prevents us from closing. | 211 // onbeforeunload handler that prevents us from closing. |
222 bool CanClose() const; | 212 bool CanClose() const; |
223 | 213 |
224 // Returns whether to draw the content drop shadow on the sides and bottom | 214 // Returns whether to draw the content drop shadow on the sides and bottom |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 bool IsTabStripSupported() const; | 436 bool IsTabStripSupported() const; |
447 bool IsToolbarSupported() const; | 437 bool IsToolbarSupported() const; |
448 bool IsBookmarkBarSupported() const; | 438 bool IsBookmarkBarSupported() const; |
449 | 439 |
450 // Put the bookmark bar where it belongs. | 440 // Put the bookmark bar where it belongs. |
451 void PlaceBookmarkBar(bool is_floating); | 441 void PlaceBookmarkBar(bool is_floating); |
452 | 442 |
453 // Decides if we should draw the frame as if the window is active. | 443 // Decides if we should draw the frame as if the window is active. |
454 bool DrawFrameAsActive() const; | 444 bool DrawFrameAsActive() const; |
455 | 445 |
| 446 void UpdateDevToolsForContents(content::WebContents* contents); |
| 447 |
| 448 // Shows docked devtools. |
| 449 void ShowDevToolsContainer(); |
| 450 |
| 451 // Hides docked devtools. |
| 452 void HideDevToolsContainer(); |
| 453 |
| 454 // Updates docked devtools size. |
| 455 void UpdateDevToolsSplitPosition(); |
| 456 |
| 457 // Tracks devtools split position |
| 458 CHROMEGTK_CALLBACK_1(BrowserWindowGtk, gboolean, OnDevToolsSplitChange, |
| 459 GdkEvent*); |
| 460 |
456 // Determine whether we use should default to native decorations or the custom | 461 // Determine whether we use should default to native decorations or the custom |
457 // frame based on the currently-running window manager. | 462 // frame based on the currently-running window manager. |
458 static bool GetCustomFramePrefDefault(); | 463 static bool GetCustomFramePrefDefault(); |
459 | 464 |
460 // The position and size of the current window. | 465 // The position and size of the current window. |
461 gfx::Rect bounds_; | 466 gfx::Rect bounds_; |
462 | 467 |
463 // The configure bounds of the current window, used to figure out whether to | 468 // The configure bounds of the current window, used to figure out whether to |
464 // ignore later configure events. See OnConfigure() for more information. | 469 // ignore later configure events. See OnConfigure() for more information. |
465 gfx::Rect configure_bounds_; | 470 gfx::Rect configure_bounds_; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 // A sub-controller that manages the Instant preview visual state. | 506 // A sub-controller that manages the Instant preview visual state. |
502 scoped_ptr<InstantPreviewControllerGtk> instant_preview_controller_; | 507 scoped_ptr<InstantPreviewControllerGtk> instant_preview_controller_; |
503 | 508 |
504 // The Extension Keybinding Registry responsible for registering listeners for | 509 // The Extension Keybinding Registry responsible for registering listeners for |
505 // accelerators that are sent to the window, that are destined to be turned | 510 // accelerators that are sent to the window, that are destined to be turned |
506 // into events and sent to the extension. | 511 // into events and sent to the extension. |
507 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; | 512 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; |
508 | 513 |
509 DevToolsDockSide devtools_dock_side_; | 514 DevToolsDockSide devtools_dock_side_; |
510 | 515 |
| 516 // Docked devtools window instance. |
| 517 DevToolsWindow* devtools_window_; |
| 518 |
511 // Split pane containing the contents_container_ and the devtools_container_. | 519 // Split pane containing the contents_container_ and the devtools_container_. |
512 GtkWidget* contents_hsplit_; | 520 GtkWidget* contents_hsplit_; |
513 | 521 |
514 // Split pane containing the contents_hsplit_ and the devtools_container_. | 522 // Split pane containing the contents_hsplit_ and the devtools_container_. |
515 GtkWidget* contents_vsplit_; | 523 GtkWidget* contents_vsplit_; |
516 | 524 |
517 // The tab strip. Always non-NULL. | 525 // The tab strip. Always non-NULL. |
518 scoped_ptr<TabStripGtk> tabstrip_; | 526 scoped_ptr<TabStripGtk> tabstrip_; |
519 | 527 |
520 // The container for info bars. Always non-NULL. | 528 // The container for info bars. Always non-NULL. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; | 563 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; |
556 | 564 |
557 FullscreenExitBubbleType fullscreen_exit_bubble_type_; | 565 FullscreenExitBubbleType fullscreen_exit_bubble_type_; |
558 | 566 |
559 content::NotificationRegistrar registrar_; | 567 content::NotificationRegistrar registrar_; |
560 | 568 |
561 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 569 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
562 }; | 570 }; |
563 | 571 |
564 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 572 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
OLD | NEW |