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

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: Review comments addressed. 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 // Updates devtools window for given contents. This method will show docked
447 // devtools window for inspected |contents| that has docked devtools
448 // and hide it for NULL or not inspected |contents|. It will also make
449 // sure devtools window size and position are restored for given tab.
450 void UpdateDevToolsForContents(content::WebContents* contents);
451
452 // Shows docked devtools.
453 void ShowDevToolsContainer();
454
455 // Hides docked devtools.
456 void HideDevToolsContainer();
457
458 // Reads split position from the current tab's devtools window and applies
459 // it to the devtools split.
460 void UpdateDevToolsSplitPosition();
461
462 // Tracks devtools split position
463 CHROMEGTK_CALLBACK_1(BrowserWindowGtk, gboolean, OnDevToolsSplitChange,
yurys 2012/10/25 15:35:24 Nuke this.
pfeldman 2012/10/25 16:14:42 Done.
464 GdkEvent*);
465
456 // Determine whether we use should default to native decorations or the custom 466 // Determine whether we use should default to native decorations or the custom
457 // frame based on the currently-running window manager. 467 // frame based on the currently-running window manager.
458 static bool GetCustomFramePrefDefault(); 468 static bool GetCustomFramePrefDefault();
459 469
460 // The position and size of the current window. 470 // The position and size of the current window.
461 gfx::Rect bounds_; 471 gfx::Rect bounds_;
462 472
463 // The configure bounds of the current window, used to figure out whether to 473 // The configure bounds of the current window, used to figure out whether to
464 // ignore later configure events. See OnConfigure() for more information. 474 // ignore later configure events. See OnConfigure() for more information.
465 gfx::Rect configure_bounds_; 475 gfx::Rect configure_bounds_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // A sub-controller that manages the Instant preview visual state. 511 // A sub-controller that manages the Instant preview visual state.
502 scoped_ptr<InstantPreviewControllerGtk> instant_preview_controller_; 512 scoped_ptr<InstantPreviewControllerGtk> instant_preview_controller_;
503 513
504 // The Extension Keybinding Registry responsible for registering listeners for 514 // The Extension Keybinding Registry responsible for registering listeners for
505 // accelerators that are sent to the window, that are destined to be turned 515 // accelerators that are sent to the window, that are destined to be turned
506 // into events and sent to the extension. 516 // into events and sent to the extension.
507 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; 517 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_;
508 518
509 DevToolsDockSide devtools_dock_side_; 519 DevToolsDockSide devtools_dock_side_;
510 520
521 // Docked devtools window instance. NULL when current tab is not inspected
522 // or is inspected with undocked version of DevToolsWindow.
523 DevToolsWindow* devtools_window_;
524
511 // Split pane containing the contents_container_ and the devtools_container_. 525 // Split pane containing the contents_container_ and the devtools_container_.
512 GtkWidget* contents_hsplit_; 526 GtkWidget* contents_hsplit_;
513 527
514 // Split pane containing the contents_hsplit_ and the devtools_container_. 528 // Split pane containing the contents_hsplit_ and the devtools_container_.
515 GtkWidget* contents_vsplit_; 529 GtkWidget* contents_vsplit_;
516 530
517 // The tab strip. Always non-NULL. 531 // The tab strip. Always non-NULL.
518 scoped_ptr<TabStripGtk> tabstrip_; 532 scoped_ptr<TabStripGtk> tabstrip_;
519 533
520 // The container for info bars. Always non-NULL. 534 // The container for info bars. Always non-NULL.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; 569 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_;
556 570
557 FullscreenExitBubbleType fullscreen_exit_bubble_type_; 571 FullscreenExitBubbleType fullscreen_exit_bubble_type_;
558 572
559 content::NotificationRegistrar registrar_; 573 content::NotificationRegistrar registrar_;
560 574
561 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); 575 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk);
562 }; 576 };
563 577
564 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ 578 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698