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

Unified Diff: chrome/browser/ui/panels/panel.h

Issue 8539025: Fix Panel to always detect when a tab is added. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test cleanup and fix Mac test hang Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel.h
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index 53d424c7266bdc5bfaf2feeda00b76c090cd34aa..64ff50c78eefb25575e497014a1db6e8acb42930 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -10,6 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
@@ -28,7 +29,9 @@ class RenderViewHost;
// Panel size is restricted to certain limits.
// - Invoke an appropriate PanelManager function to do stuff that might affect
// other Panels. For example deleting a panel would rearrange other panels.
-class Panel : public BrowserWindow, public content::NotificationObserver {
+class Panel : public BrowserWindow,
+ public TabStripModelObserver,
+ public content::NotificationObserver {
public:
enum ExpansionState {
// The panel is fully expanded with both title-bar and the client-area.
@@ -169,6 +172,11 @@ class Panel : public BrowserWindow, public content::NotificationObserver {
const gfx::Rect& rect) OVERRIDE;
virtual void ShowAvatarBubbleFromAvatarButton() OVERRIDE;
+ // TabStripModelObserver overrides.
+ virtual void TabInsertedAt(TabContentsWrapper* contents,
+ int index,
+ bool foreground) OVERRIDE;
+
// content::NotificationObserver overrides.
virtual void Observe(int type,
const content::NotificationSource& source,
@@ -188,6 +196,9 @@ class Panel : public BrowserWindow, public content::NotificationObserver {
// until the window has been created. (e.g. GTK)
void OnWindowSizeAvailable();
+ // Asynchronous completion of panel close request.
+ void OnNativePanelClosed();
+
NativePanel* native_panel() { return native_panel_; }
Browser* browser() const;
ExpansionState expansion_state() const { return expansion_state_; }
@@ -217,6 +228,8 @@ class Panel : public BrowserWindow, public content::NotificationObserver {
// NULL might be returned if the tab has not been added.
RenderViewHost* GetRenderViewHost() const;
+ void EnableAutoResize(RenderViewHost* render_view_host);
+
// Requests RenderViewHost not to show the scrollbars till |max_size_| since
// the panel can grow to |max_size_|.
void RequestRenderViewHostToDisableScrollbars(
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698