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

Unified Diff: chrome/browser/ui/views/aura/panel_view_aura.h

Issue 9428018: Create BaseWindow and ExtensionWindowWrapper for extension API access to Panels (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 10 months 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 | « chrome/browser/ui/fullscreen_controller.cc ('k') | chrome/browser/ui/views/aura/panel_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/aura/panel_view_aura.h
diff --git a/chrome/browser/ui/views/aura/panel_view_aura.h b/chrome/browser/ui/views/aura/panel_view_aura.h
index 66d2191f10f1725d1d4e2278f2bbcbed0dc07e6d..2f445d00a8f7fe5d5aeb8456a47476feb256b9b6 100644
--- a/chrome/browser/ui/views/aura/panel_view_aura.h
+++ b/chrome/browser/ui/views/aura/panel_view_aura.h
@@ -9,10 +9,13 @@
#include <string>
#include "base/basictypes.h"
+#include "chrome/browser/sessions/session_id.h"
+#include "chrome/browser/ui/base_window.h"
#include "ui/gfx/size.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/widget/widget_delegate.h"
+class ExtensionWindowController;
class GURL;
class Profile;
@@ -32,7 +35,8 @@ class PanelHost;
// PanelViewAura is used to display HTML in a Panel window.
//
class PanelViewAura : public views::NativeViewHost,
- public views::WidgetDelegate {
+ public views::WidgetDelegate,
+ public BaseWindow {
public:
explicit PanelViewAura(const std::string& title);
virtual ~PanelViewAura();
@@ -50,6 +54,11 @@ class PanelViewAura : public views::NativeViewHost,
// Set the preferred size of the contents.
void SetContentPreferredSize(const gfx::Size& size);
+ const SessionID& session_id() const { return session_id_; }
+ ExtensionWindowController* extension_window_controller() const {
+ return extension_window_controller_.get();
+ }
+
// Overridden from views::View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
@@ -63,13 +72,32 @@ class PanelViewAura : public views::NativeViewHost,
virtual const views::Widget* GetWidget() const OVERRIDE;
virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
+ // Overridden from BaseWindow:
+ virtual bool IsActive() const OVERRIDE;
+ virtual bool IsMaximized() const OVERRIDE;
+ virtual bool IsMinimized() const OVERRIDE;
+ virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
+ virtual gfx::Rect GetBounds() const OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void ShowInactive() OVERRIDE;
+ virtual void Close() OVERRIDE;
+ virtual void Activate() OVERRIDE;
+ virtual void Deactivate() OVERRIDE;
+ virtual void Maximize() OVERRIDE;
+ virtual void Minimize() OVERRIDE;
+ virtual void Restore() OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+ virtual void FlashFrame(bool flash) OVERRIDE;
+
private:
+ const SessionID session_id_;
std::string title_;
gfx::Size preferred_size_;
// Owned internal host class implementing WebContents and Extension Delegates.
scoped_ptr<internal::PanelHost> host_;
// Unowned pointer to the widget.
views::Widget* widget_;
+ scoped_ptr<ExtensionWindowController> extension_window_controller_;
DISALLOW_COPY_AND_ASSIGN(PanelViewAura);
};
« no previous file with comments | « chrome/browser/ui/fullscreen_controller.cc ('k') | chrome/browser/ui/views/aura/panel_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698