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

Unified Diff: extensions/browser/app_window/native_app_window.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: extensions/browser/app_window/native_app_window.h
diff --git a/extensions/browser/app_window/native_app_window.h b/extensions/browser/app_window/native_app_window.h
index b5007dde4f80b26c4be88fe484f5c7b6e98d4853..8000be030ff4e80748b3eb4d47a2a95907b492f7 100644
--- a/extensions/browser/app_window/native_app_window.h
+++ b/extensions/browser/app_window/native_app_window.h
@@ -5,102 +5,14 @@
#ifndef EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_
#define EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_
-#include <vector>
+// Forwarding header. TODO(tapted): Delete this file.
-#include "base/memory/scoped_ptr.h"
-#include "components/web_modal/web_contents_modal_dialog_host.h"
-#include "third_party/skia/include/core/SkColor.h"
-#include "ui/base/base_window.h"
-#include "ui/gfx/insets.h"
-
-namespace content {
-struct NativeWebKeyboardEvent;
-}
+#include "components/native_app_window/native_app_window.h"
namespace extensions {
-struct DraggableRegion;
-
-// This is an interface to a native implementation of a app window, used for
-// new-style packaged apps. App windows contain a web contents, but no tabs
-// or URL bar.
-class NativeAppWindow : public ui::BaseWindow,
- public web_modal::WebContentsModalDialogHost {
- public:
- // Sets whether the window is fullscreen and the type of fullscreen.
- // |fullscreen_types| is a bit field of AppWindow::FullscreenType.
- virtual void SetFullscreen(int fullscreen_types) = 0;
-
- // Returns whether the window is fullscreen or about to enter fullscreen.
- virtual bool IsFullscreenOrPending() const = 0;
-
- // Called when the icon of the window changes.
- virtual void UpdateWindowIcon() = 0;
-
- // Called when the title of the window changes.
- virtual void UpdateWindowTitle() = 0;
-
- // Called to update the badge icon.
- virtual void UpdateBadgeIcon() = 0;
-
- // Called when the draggable regions are changed.
- virtual void UpdateDraggableRegions(
- const std::vector<DraggableRegion>& regions) = 0;
-
- // Returns the region used by frameless windows for dragging. May return NULL.
- virtual SkRegion* GetDraggableRegion() = 0;
-
- // Called when the window shape is changed. If |region| is NULL then the
- // window is restored to the default shape.
- virtual void UpdateShape(scoped_ptr<SkRegion> region) = 0;
-
- // Allows the window to handle unhandled keyboard messages coming back from
- // the renderer.
- virtual void HandleKeyboardEvent(
- const content::NativeWebKeyboardEvent& event) = 0;
-
- // Returns true if the window has no frame, as for a window opened by
- // chrome.app.window.create with the option 'frame' set to 'none'.
- virtual bool IsFrameless() const = 0;
-
- // Returns information about the window's frame.
- virtual bool HasFrameColor() const = 0;
- virtual SkColor ActiveFrameColor() const = 0;
- virtual SkColor InactiveFrameColor() const = 0;
-
- // Returns the difference between the window bounds (including titlebar and
- // borders) and the content bounds, if any.
- virtual gfx::Insets GetFrameInsets() const = 0;
-
- // Hide or show this window as part of hiding or showing the app.
- // This may have different logic to Hide, Show, and ShowInactive as those are
- // called via the AppWindow javascript API.
- virtual void ShowWithApp() = 0;
- virtual void HideWithApp() = 0;
-
- // Updates custom entries for the context menu of the app's taskbar/dock/shelf
- // icon.
- virtual void UpdateShelfMenu() = 0;
-
- // Returns the minimum size constraints of the content.
- virtual gfx::Size GetContentMinimumSize() const = 0;
-
- // Returns the maximum size constraints of the content.
- virtual gfx::Size GetContentMaximumSize() const = 0;
-
- // Updates the minimum and maximum size constraints of the content.
- virtual void SetContentSizeConstraints(const gfx::Size& min_size,
- const gfx::Size& max_size) = 0;
-
- // Returns whether the window show be visible on all workspaces.
- virtual void SetVisibleOnAllWorkspaces(bool always_visible) = 0;
-
- // Returns false if the underlying native window ignores alpha transparency
- // when compositing.
- virtual bool CanHaveAlphaEnabled() const = 0;
-
- virtual ~NativeAppWindow() {}
-};
+typedef native_app_window::DraggableRegion DraggableRegion;
+typedef native_app_window::NativeAppWindow NativeAppWindow;
} // namespace extensions
« no previous file with comments | « extensions/browser/app_window/app_window_contents.h ('k') | extensions/browser/app_window/size_constraints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698