| Index: chrome/browser/ui/ash/shell_utility_window_ash.h
|
| diff --git a/chrome/browser/ui/views/extensions/shell_window_views.h b/chrome/browser/ui/ash/shell_utility_window_ash.h
|
| similarity index 52%
|
| copy from chrome/browser/ui/views/extensions/shell_window_views.h
|
| copy to chrome/browser/ui/ash/shell_utility_window_ash.h
|
| index 18beabf4d4b353d88d2d5c25beb27e91ef7a69f6..a0921efa054089713bd64154f495d3a27ad455ae 100644
|
| --- a/chrome/browser/ui/views/extensions/shell_window_views.h
|
| +++ b/chrome/browser/ui/ash/shell_utility_window_ash.h
|
| @@ -2,41 +2,38 @@
|
| // 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_UTILITY_WINDOW_ASH_H_
|
| +#define CHROME_BROWSER_UI_ASH_SHELL_UTILITY_WINDOW_ASH_H_
|
|
|
| -#include "chrome/browser/ui/base_window.h"
|
| +#include "base/basictypes.h"
|
| +#include "base/string16.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 ash {
|
| +class PanelFrameView;
|
| }
|
|
|
| namespace views {
|
| class WebView;
|
| +class Widget;
|
| }
|
|
|
| -class ShellWindowViews : public NativeShellWindow,
|
| - public views::WidgetDelegateView {
|
| +///////////////////////////////////////////////////////////////////////////////
|
| +// ShellUtilityWindowAsh is used to display HTML in a Panel window.
|
| +//
|
| +class ShellUtilityWindowAsh : public NativeShellWindow,
|
| + public views::WidgetDelegateView {
|
| public:
|
| - ShellWindowViews(ShellWindow* shell_window,
|
| - const ShellWindow::CreateParams& params);
|
| -
|
| - bool frameless() const { return frameless_; }
|
| - SkRegion* draggable_region() { return draggable_region_.get(); }
|
| + ShellUtilityWindowAsh(ShellWindow* shell_window,
|
| + const ShellWindow::CreateParams& create_params);
|
| + virtual ~ShellUtilityWindowAsh();
|
|
|
| // BaseWindow implementation.
|
| virtual bool IsActive() const OVERRIDE;
|
| @@ -58,52 +55,30 @@ class ShellWindowViews : public NativeShellWindow,
|
| virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
|
| virtual void FlashFrame(bool flash) OVERRIDE;
|
| virtual bool IsAlwaysOnTop() const OVERRIDE;
|
| + // TODO(stevenjb): Make virtual when merging with CL:11369237
|
| + gfx::Insets GetFrameInsets() const;
|
|
|
| // WidgetDelegate implementation.
|
| 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 +90,14 @@ 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 this
|
| views::WebView* web_view_;
|
| - views::Widget* window_;
|
| - bool is_fullscreen_;
|
| -
|
| - scoped_ptr<SkRegion> draggable_region_;
|
| -
|
| + views::Widget* window_; // Unowned
|
| + ash::PanelFrameView* panel_frame_view_; // Unowned
|
| + 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(ShellUtilityWindowAsh);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_
|
| +#endif // CHROME_BROWSER_UI_ASH_SHELL_UTILITY_WINDOW_ASH_H_
|
|
|