Index: chrome/browser/ui/ash/shell_panel_ash.h |
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.h b/chrome/browser/ui/ash/shell_panel_ash.h |
similarity index 52% |
copy from chrome/browser/ui/views/extensions/shell_window_views.h |
copy to chrome/browser/ui/ash/shell_panel_ash.h |
index 18beabf4d4b353d88d2d5c25beb27e91ef7a69f6..0fe3e614650ca9c7707655edc991f51ebbd720f3 100644 |
--- a/chrome/browser/ui/views/extensions/shell_window_views.h |
+++ b/chrome/browser/ui/ash/shell_panel_ash.h |
@@ -2,41 +2,39 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ |
-#define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ |
+#ifndef CHROME_BROWSER_UI_ASH_SHELL_PANEL_ASH_H_ |
+#define CHROME_BROWSER_UI_ASH_SHELL_PANEL_ASH_H_ |
-#include "chrome/browser/ui/base_window.h" |
+#include <string> |
flackr
2012/11/15 16:04:17
I don't see any std::string's, is this necessary?
stevenjb
2012/11/16 23:42:40
Should be string16.h, changed
|
+ |
+#include "base/basictypes.h" |
#include "chrome/browser/ui/extensions/native_shell_window.h" |
#include "chrome/browser/ui/extensions/shell_window.h" |
-#include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" |
-#include "third_party/skia/include/core/SkRegion.h" |
-#include "ui/gfx/image/image_skia.h" |
-#include "ui/gfx/rect.h" |
+#include "ui/gfx/size.h" |
+#include "ui/views/controls/native/native_view_host.h" |
#include "ui/views/widget/widget_delegate.h" |
-class ExtensionKeybindingRegistryViews; |
+class GURL; |
class Profile; |
-namespace content { |
-class WebContents; |
-} |
- |
-namespace extensions { |
-class Extension; |
-} |
- |
namespace views { |
class WebView; |
+class Widget; |
} |
-class ShellWindowViews : public NativeShellWindow, |
- public views::WidgetDelegateView { |
- public: |
- ShellWindowViews(ShellWindow* shell_window, |
- const ShellWindow::CreateParams& params); |
+namespace internal { |
+class PanelHost; |
+} |
- bool frameless() const { return frameless_; } |
- SkRegion* draggable_region() { return draggable_region_.get(); } |
+/////////////////////////////////////////////////////////////////////////////// |
+// PanelViewAura is used to display HTML in a Panel window. |
+// |
+class ShellPanelAsh : public NativeShellWindow, |
+ public views::WidgetDelegateView { |
+ public: |
+ ShellPanelAsh(ShellWindow* shell_window, |
+ const ShellWindow::CreateParams& create_params); |
+ virtual ~ShellPanelAsh(); |
// BaseWindow implementation. |
virtual bool IsActive() const OVERRIDE; |
@@ -63,47 +61,23 @@ class ShellWindowViews : public NativeShellWindow, |
virtual views::View* GetContentsView() OVERRIDE; |
virtual views::NonClientFrameView* CreateNonClientFrameView( |
views::Widget* widget) OVERRIDE; |
+ virtual void DeleteDelegate() OVERRIDE; |
virtual bool CanResize() const OVERRIDE; |
- virtual bool CanMaximize() const OVERRIDE; |
+ virtual string16 GetWindowTitle() const OVERRIDE; |
+ virtual bool ShouldShowWindowTitle() const OVERRIDE; |
virtual views::Widget* GetWidget() OVERRIDE; |
virtual const views::Widget* GetWidget() const OVERRIDE; |
- virtual string16 GetWindowTitle() const OVERRIDE; |
- virtual void DeleteDelegate() OVERRIDE; |
virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
- virtual bool ShouldDescendIntoChildForEventHandling( |
- gfx::NativeView child, |
- const gfx::Point& location) OVERRIDE; |
- virtual gfx::ImageSkia GetWindowAppIcon() OVERRIDE; |
- virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; |
- virtual bool ShouldShowWindowTitle() const OVERRIDE; |
- virtual void OnWidgetMove() OVERRIDE; |
protected: |
// views::View implementation. |
virtual void Layout() OVERRIDE; |
virtual void ViewHierarchyChanged( |
bool is_add, views::View *parent, views::View *child) OVERRIDE; |
- virtual gfx::Size GetMinimumSize() OVERRIDE; |
- virtual gfx::Size GetMaximumSize() OVERRIDE; |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
virtual void OnFocus() OVERRIDE; |
- Profile* profile() { return shell_window_->profile(); } |
- content::WebContents* web_contents() { |
- return shell_window_->web_contents(); |
- } |
- const extensions::Extension* extension() { |
- return shell_window_->extension(); |
- } |
- |
- // views::WidgetDelegate implementation. |
- virtual void SaveWindowPlacement(const gfx::Rect& bounds, |
- ui::WindowShowState show_state) OVERRIDE; |
- |
private: |
- friend class ShellWindowFrameView; |
- |
- virtual ~ShellWindowViews(); |
- |
// NativeShellWindow implementation. |
virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
virtual bool IsFullscreenOrPending() const OVERRIDE; |
@@ -115,26 +89,13 @@ class ShellWindowViews : public NativeShellWindow, |
const content::NativeWebKeyboardEvent& event) OVERRIDE; |
virtual void RenderViewHostChanged() OVERRIDE; |
- void OnViewWasResized(); |
- |
- ShellWindow* shell_window_; // weak - ShellWindow owns NativeShellWindow. |
- |
+ ShellWindow* shell_window_; // weak - ShellWindow owns ShellPanelAsh. |
views::WebView* web_view_; |
- views::Widget* window_; |
- bool is_fullscreen_; |
- |
- scoped_ptr<SkRegion> draggable_region_; |
- |
+ views::Widget* window_; // Unowned pointer to the widget. |
+ gfx::Size preferred_size_; |
bool frameless_; |
- gfx::Size minimum_size_; |
- gfx::Size maximum_size_; |
- |
- // The class that registers for keyboard shortcuts for extension commands. |
- scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; |
- |
- UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
- DISALLOW_COPY_AND_ASSIGN(ShellWindowViews); |
+ DISALLOW_COPY_AND_ASSIGN(ShellPanelAsh); |
}; |
-#endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ |
+#endif // CHROME_BROWSER_UI_ASH_SHELL_PANEL_ASH_H_ |