// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_

#include "chrome/browser/ui/gtk/browser_window_gtk.h"

class Panel;

class PanelBrowserWindowGtk : public BrowserWindowGtk {
 public:
  PanelBrowserWindowGtk(Browser* browser, Panel* panel);
  virtual ~PanelBrowserWindowGtk() {}

  // BrowserWindowGtk overrides
  virtual void Init() OVERRIDE;

  // BrowserWindow overrides
  virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;

 protected:
  // BrowserWindowGtk overrides
  virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE;
  virtual bool HandleTitleBarLeftMousePress(
      GdkEventButton* event,
      guint32 last_click_time,
      gfx::Point last_click_position) OVERRIDE;
  virtual void SaveWindowPosition() OVERRIDE;
  virtual void SetGeometryHints() OVERRIDE;
  virtual bool UseCustomFrame() OVERRIDE;

 private:
  void SetBoundsImpl();

  scoped_ptr<Panel> panel_;
  DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
};

#endif  // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_

// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_

#include "chrome/browser/ui/gtk/browser_window_gtk.h"

class Panel;

class PanelBrowserWindowGtk : public BrowserWindowGtk {
 public:
  PanelBrowserWindowGtk(Browser* browser, Panel* panel);
  virtual ~PanelBrowserWindowGtk() {}

  // BrowserWindowGtk overrides
  virtual void Init() OVERRIDE;

  // BrowserWindow overrides
  virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;

 protected:
  // BrowserWindowGtk overrides
  virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE;
  virtual bool HandleTitleBarLeftMousePress(
      GdkEventButton* event,
      guint32 last_click_time,
      gfx::Point last_click_position) OVERRIDE;
  virtual void SaveWindowPosition() OVERRIDE;
  virtual void SetGeometryHints() OVERRIDE;
  virtual bool UseCustomFrame() OVERRIDE;

 private:
  void SetBoundsImpl();

  Panel* panel_;
  DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
};

#endif  // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_

Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK. Reason: PanelBrowserWindow dtor is now complex and cannot be inlined.
Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK.
Reason: PanelBrowserWindow dtor is now complex and cannot be inlined.

BUG=None
TEST=Verified WindowOpenPanel test now hits Panel destructor.

Review URL: http://codereview.chromium.org/7120011

TBR=jennb@chromium.org
Review URL: http://codereview.chromium.org/7003035

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88159 0039d316-1c4b-4281-b951-d872f2087c98
