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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.h

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 3 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
Index: chrome/browser/ui/views/apps/chrome_native_app_window_views.h
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
index f5d63359bde637e72e2ff117eafaa47efb820555..1be8a76fa14f68573cdc359d2a2ae0cc37fc431e 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
@@ -19,17 +19,22 @@ class ImmersiveFullscreenController;
}
#endif
-class ExtensionKeybindingRegistryViews;
+namespace extensions {
+class AppWindow;
+}
namespace views {
class MenuRunner;
}
+class ExtensionKeybindingRegistryViews;
+
class ChromeNativeAppWindowViews
: public native_app_window::NativeAppWindowViews,
public views::ContextMenuController {
public:
- ChromeNativeAppWindowViews();
+ explicit ChromeNativeAppWindowViews(
+ extensions::AppWindow* extensions_app_window);
virtual ~ChromeNativeAppWindowViews();
SkRegion* shape() { return shape_.get(); }
@@ -41,11 +46,15 @@ class ChromeNativeAppWindowViews
views::Widget* widget);
virtual void InitializeDefaultWindow(
- const extensions::AppWindow::CreateParams& create_params);
+ const native_app_window::AppWindowCreateParams& create_params);
virtual void InitializePanelWindow(
- const extensions::AppWindow::CreateParams& create_params);
+ const native_app_window::AppWindowCreateParams& create_params);
virtual views::NonClientFrameView* CreateStandardDesktopAppFrame();
+ extensions::AppWindow* extensions_app_window() {
+ return extensions_app_window_;
+ }
+
private:
FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest,
ResizeInsetsWithinBounds);
@@ -85,8 +94,8 @@ class ChromeNativeAppWindowViews
// NativeAppWindowViews implementation.
virtual void InitializeWindow(
- extensions::AppWindow* app_window,
- const extensions::AppWindow::CreateParams& create_params) OVERRIDE;
+ native_app_window::NativeAppWindowDelegate* app_window,
+ const native_app_window::AppWindowCreateParams& create_params) OVERRIDE;
// True if the window is fullscreen or fullscreen is pending.
bool is_fullscreen_;
@@ -115,6 +124,9 @@ class ChromeNativeAppWindowViews
// Used to show the system menu.
scoped_ptr<views::MenuRunner> menu_runner_;
+ // Strongly typed delegate.
+ extensions::AppWindow* extensions_app_window_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews);
};

Powered by Google App Engine
This is Rietveld 408576698