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

Unified Diff: components/native_app_window/native_app_window_delegate.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: components/native_app_window/native_app_window_delegate.h
diff --git a/components/native_app_window/native_app_window_delegate.h b/components/native_app_window/native_app_window_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a4a268e06613a329e24511442c80af1e4171318
--- /dev/null
+++ b/components/native_app_window/native_app_window_delegate.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_DELEGATE_H_
+#define COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_DELEGATE_H_
+
+#include "base/strings/string16.h"
+#include "components/native_app_window/app_window_create_params.h"
+
+namespace content {
+class BrowserContext;
+class WebContents;
+}
+
+namespace native_app_window {
+
+class NativeAppWindowDelegate {
+ public:
+ virtual content::WebContents* GetWebContents() = 0;
+ virtual content::BrowserContext* GetBrowserContext() = 0;
+
+ // Call to notify ShellRegistry and delete the window. Subclasses should
+ // invoke this method instead of using "delete this".
+ virtual void OnNativeClose() = 0;
+
+ // Should be called by native implementations when the window size, position,
+ // or minimized/maximized state has changed.
+ virtual void OnNativeWindowChanged() = 0;
+
+ // Should be called by native implementations when the window is activated.
+ virtual void OnNativeWindowActivated() = 0;
+
+ // Whether the app window wants to be alpha enabled.
+ virtual bool RequestedAlphaEnabled() const = 0;
+
+ // NativeAppWindows should call this to determine what the window's title
+ // is on startup and from within UpdateWindowTitle().
+ virtual base::string16 GetTitle() const = 0;
+
+ virtual native_app_window::WindowType GetWindowType() const = 0;
+
+ virtual bool WindowTypeIsPanel() const = 0;
+};
+
+} // namespace native_app_window
+
+#endif // COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_DELEGATE_H_
« no previous file with comments | « components/native_app_window/native_app_window.h ('k') | components/native_app_window/native_app_window_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698