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

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.h

Issue 11272015: DevTools: “Dock to right” broken after turning a tab into a window of its own. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GTK comments addressed, docs updated. Created 8 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) 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
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; 196 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE;
196 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; 197 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE;
197 198
198 // Overridden from ExtensionKeybindingRegistry::Delegate: 199 // Overridden from ExtensionKeybindingRegistry::Delegate:
199 virtual extensions::ActiveTabPermissionGranter* 200 virtual extensions::ActiveTabPermissionGranter*
200 GetActiveTabPermissionGranter() OVERRIDE; 201 GetActiveTabPermissionGranter() OVERRIDE;
201 202
202 // Accessor for the tab strip. 203 // Accessor for the tab strip.
203 TabStripGtk* tabstrip() const { return tabstrip_.get(); } 204 TabStripGtk* tabstrip() const { return tabstrip_.get(); }
204 205
205 void UpdateDevToolsForContents(content::WebContents* contents);
206
207 // Shows docked devtools.
208 void ShowDevToolsContainer(DevToolsDockSide dock_side);
209
210 // Hides docked devtools.
211 void HideDevToolsContainer();
212
213 // Updates dock side orientation for the devtools.
214 void SetDevToolsDockSide(DevToolsDockSide side);
215
216 void OnDebouncedBoundsChanged(); 206 void OnDebouncedBoundsChanged();
217 207
218 // Request the underlying window to unmaximize. 208 // Request the underlying window to unmaximize.
219 void UnMaximize(); 209 void UnMaximize();
220 210
221 // Returns false if we're not ready to close yet. E.g., a tab may have an 211 // Returns false if we're not ready to close yet. E.g., a tab may have an
222 // onbeforeunload handler that prevents us from closing. 212 // onbeforeunload handler that prevents us from closing.
223 bool CanClose() const; 213 bool CanClose() const;
224 214
225 // Returns whether to draw the content drop shadow on the sides and bottom 215 // 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
447 bool IsTabStripSupported() const; 437 bool IsTabStripSupported() const;
448 bool IsToolbarSupported() const; 438 bool IsToolbarSupported() const;
449 bool IsBookmarkBarSupported() const; 439 bool IsBookmarkBarSupported() const;
450 440
451 // Put the bookmark bar where it belongs. 441 // Put the bookmark bar where it belongs.
452 void PlaceBookmarkBar(bool is_floating); 442 void PlaceBookmarkBar(bool is_floating);
453 443
454 // Decides if we should draw the frame as if the window is active. 444 // Decides if we should draw the frame as if the window is active.
455 bool DrawFrameAsActive() const; 445 bool DrawFrameAsActive() const;
456 446
447 // Updates devtools window for given contents. This method will show docked
448 // devtools window for inspected |contents| that has docked devtools
449 // and hide it for NULL or not inspected |contents|. It will also make
450 // sure devtools window size and position are restored for given tab.
451 void UpdateDevToolsForContents(content::WebContents* contents);
452
453 // Shows docked devtools.
454 void ShowDevToolsContainer();
455
456 // Hides docked devtools.
457 void HideDevToolsContainer();
458
459 // Reads split position from the current tab's devtools window and applies
460 // it to the devtools split.
461 void UpdateDevToolsSplitPosition();
462
457 // Determine whether we use should default to native decorations or the custom 463 // Determine whether we use should default to native decorations or the custom
458 // frame based on the currently-running window manager. 464 // frame based on the currently-running window manager.
459 static bool GetCustomFramePrefDefault(); 465 static bool GetCustomFramePrefDefault();
460 466
461 // The position and size of the current window. 467 // The position and size of the current window.
462 gfx::Rect bounds_; 468 gfx::Rect bounds_;
463 469
464 // The configure bounds of the current window, used to figure out whether to 470 // The configure bounds of the current window, used to figure out whether to
465 // ignore later configure events. See OnConfigure() for more information. 471 // ignore later configure events. See OnConfigure() for more information.
466 gfx::Rect configure_bounds_; 472 gfx::Rect configure_bounds_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // A sub-controller that manages the Instant preview visual state. 508 // A sub-controller that manages the Instant preview visual state.
503 scoped_ptr<InstantPreviewControllerGtk> instant_preview_controller_; 509 scoped_ptr<InstantPreviewControllerGtk> instant_preview_controller_;
504 510
505 // The Extension Keybinding Registry responsible for registering listeners for 511 // The Extension Keybinding Registry responsible for registering listeners for
506 // accelerators that are sent to the window, that are destined to be turned 512 // accelerators that are sent to the window, that are destined to be turned
507 // into events and sent to the extension. 513 // into events and sent to the extension.
508 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; 514 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_;
509 515
510 DevToolsDockSide devtools_dock_side_; 516 DevToolsDockSide devtools_dock_side_;
511 517
518 // Docked devtools window instance. NULL when current tab is not inspected
519 // or is inspected with undocked version of DevToolsWindow.
520 DevToolsWindow* devtools_window_;
521
512 // Split pane containing the contents_container_ and the devtools_container_. 522 // Split pane containing the contents_container_ and the devtools_container_.
513 GtkWidget* contents_hsplit_; 523 GtkWidget* contents_hsplit_;
514 524
515 // Split pane containing the contents_hsplit_ and the devtools_container_. 525 // Split pane containing the contents_hsplit_ and the devtools_container_.
516 GtkWidget* contents_vsplit_; 526 GtkWidget* contents_vsplit_;
517 527
518 // The tab strip. Always non-NULL. 528 // The tab strip. Always non-NULL.
519 scoped_ptr<TabStripGtk> tabstrip_; 529 scoped_ptr<TabStripGtk> tabstrip_;
520 530
521 // The container for info bars. Always non-NULL. 531 // The container for info bars. Always non-NULL.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; 566 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_;
557 567
558 FullscreenExitBubbleType fullscreen_exit_bubble_type_; 568 FullscreenExitBubbleType fullscreen_exit_bubble_type_;
559 569
560 content::NotificationRegistrar registrar_; 570 content::NotificationRegistrar registrar_;
561 571
562 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); 572 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk);
563 }; 573 };
564 574
565 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ 575 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698