| Index: components/native_app_window/native_app_window_views.h
|
| diff --git a/components/native_app_window/native_app_window_views.h b/components/native_app_window/native_app_window_views.h
|
| index 0467d2dcb9bde545106e6cb6832f6de856441557..b3684b61abaff50fa2c65f8fe1b3433b033ad937 100644
|
| --- a/components/native_app_window/native_app_window_views.h
|
| +++ b/components/native_app_window/native_app_window_views.h
|
| @@ -6,10 +6,11 @@
|
| #define COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_
|
|
|
| #include "base/observer_list.h"
|
| +#include "components/native_app_window/native_app_window.h"
|
| +#include "components/native_app_window/native_app_window_delegate.h"
|
| +#include "components/native_app_window/native_app_window_export.h"
|
| +#include "components/native_app_window/size_constraints.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| -#include "extensions/browser/app_window/app_window.h"
|
| -#include "extensions/browser/app_window/native_app_window.h"
|
| -#include "extensions/browser/app_window/size_constraints.h"
|
| #include "ui/gfx/rect.h"
|
| #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
|
| #include "ui/views/widget/widget.h"
|
| @@ -24,10 +25,6 @@ class RenderViewHost;
|
| class WebContents;
|
| }
|
|
|
| -namespace extensions {
|
| -class Extension;
|
| -}
|
| -
|
| namespace ui {
|
| class MenuModel;
|
| }
|
| @@ -39,17 +36,20 @@ class WebView;
|
|
|
| namespace native_app_window {
|
|
|
| +class AppWindowCreateParams;
|
| +
|
| // A NativeAppWindow backed by a views::Widget. This class may be used alone
|
| // as a stub or subclassed (for example, ChromeNativeAppWindowViews).
|
| -class NativeAppWindowViews : public extensions::NativeAppWindow,
|
| - public content::WebContentsObserver,
|
| - public views::WidgetDelegateView,
|
| - public views::WidgetObserver {
|
| +class NATIVE_APP_WINDOW_VIEWS_EXPORT NativeAppWindowViews
|
| + : public NativeAppWindow,
|
| + public content::WebContentsObserver,
|
| + public views::WidgetDelegateView,
|
| + public views::WidgetObserver {
|
| public:
|
| NativeAppWindowViews();
|
| virtual ~NativeAppWindowViews();
|
| - void Init(extensions::AppWindow* app_window,
|
| - const extensions::AppWindow::CreateParams& create_params);
|
| + void Init(NativeAppWindowDelegate* app_window,
|
| + const AppWindowCreateParams& create_params);
|
|
|
| // Signal that CanHaveTransparentBackground has changed.
|
| void OnCanHaveAlphaEnabledChanged();
|
| @@ -60,17 +60,16 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
|
| void set_web_view_for_testing(views::WebView* view) { web_view_ = view; }
|
|
|
| protected:
|
| - extensions::AppWindow* app_window() { return app_window_; }
|
| - const extensions::AppWindow* app_window() const { return app_window_; }
|
| + NativeAppWindowDelegate* app_window() { return app_window_; }
|
| + const NativeAppWindowDelegate* app_window() const { return app_window_; }
|
|
|
| const views::Widget* widget() const { return widget_; }
|
|
|
| views::WebView* web_view() { return web_view_; }
|
|
|
| // Initializes |widget_| for |app_window|.
|
| - virtual void InitializeWindow(
|
| - extensions::AppWindow* app_window,
|
| - const extensions::AppWindow::CreateParams& create_params);
|
| + virtual void InitializeWindow(NativeAppWindowDelegate* app_window,
|
| + const AppWindowCreateParams& create_params);
|
|
|
| // ui::BaseWindow implementation.
|
| virtual bool IsActive() const OVERRIDE;
|
| @@ -142,7 +141,7 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
|
| virtual void UpdateWindowTitle() OVERRIDE;
|
| virtual void UpdateBadgeIcon() OVERRIDE;
|
| virtual void UpdateDraggableRegions(
|
| - const std::vector<extensions::DraggableRegion>& regions) OVERRIDE;
|
| + const std::vector<DraggableRegion>& regions) OVERRIDE;
|
| virtual SkRegion* GetDraggableRegion() OVERRIDE;
|
| virtual void UpdateShape(scoped_ptr<SkRegion> region) OVERRIDE;
|
| virtual void HandleKeyboardEvent(
|
| @@ -175,7 +174,7 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
|
| // Informs modal dialogs that they need to update their positions.
|
| void OnViewWasResized();
|
|
|
| - extensions::AppWindow* app_window_; // Not owned.
|
| + NativeAppWindowDelegate* app_window_; // Not owned.
|
| views::WebView* web_view_;
|
| views::Widget* widget_;
|
|
|
| @@ -183,7 +182,7 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
|
|
|
| bool frameless_;
|
| bool resizable_;
|
| - extensions::SizeConstraints size_constraints_;
|
| + SizeConstraints size_constraints_;
|
|
|
| views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
|
|
|
|
|