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

Side by Side Diff: components/native_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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ 5 #ifndef COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ 6 #define COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "components/native_app_window/native_app_window_export.h"
11 #include "components/web_modal/web_contents_modal_dialog_host.h" 12 #include "components/web_modal/web_contents_modal_dialog_host.h"
12 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/base/base_window.h" 14 #include "ui/base/base_window.h"
14 #include "ui/gfx/insets.h" 15 #include "ui/gfx/insets.h"
15 16
16 namespace content { 17 namespace content {
17 struct NativeWebKeyboardEvent; 18 struct NativeWebKeyboardEvent;
18 } 19 }
19 20
20 namespace extensions { 21 namespace native_app_window {
21 22
22 struct DraggableRegion; 23 struct DraggableRegion;
23 24
24 // This is an interface to a native implementation of a app window, used for 25 // This is an interface to a native implementation of a app window, used for
25 // new-style packaged apps. App windows contain a web contents, but no tabs 26 // new-style packaged apps. App windows contain a web contents, but no tabs
26 // or URL bar. 27 // or URL bar.
27 class NativeAppWindow : public ui::BaseWindow, 28 class NATIVE_APP_WINDOW_EXPORT NativeAppWindow
28 public web_modal::WebContentsModalDialogHost { 29 : public ui::BaseWindow,
30 public web_modal::WebContentsModalDialogHost {
29 public: 31 public:
30 // Sets whether the window is fullscreen and the type of fullscreen. 32 // Sets whether the window is fullscreen and the type of fullscreen.
31 // |fullscreen_types| is a bit field of AppWindow::FullscreenType. 33 // |fullscreen_types| is a bit field of AppWindow::FullscreenType.
32 virtual void SetFullscreen(int fullscreen_types) = 0; 34 virtual void SetFullscreen(int fullscreen_types) = 0;
33 35
34 // Returns whether the window is fullscreen or about to enter fullscreen. 36 // Returns whether the window is fullscreen or about to enter fullscreen.
35 virtual bool IsFullscreenOrPending() const = 0; 37 virtual bool IsFullscreenOrPending() const = 0;
36 38
37 // Called when the icon of the window changes. 39 // Called when the icon of the window changes.
38 virtual void UpdateWindowIcon() = 0; 40 virtual void UpdateWindowIcon() = 0;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Updates the minimum and maximum size constraints of the content. 93 // Updates the minimum and maximum size constraints of the content.
92 virtual void SetContentSizeConstraints(const gfx::Size& min_size, 94 virtual void SetContentSizeConstraints(const gfx::Size& min_size,
93 const gfx::Size& max_size) = 0; 95 const gfx::Size& max_size) = 0;
94 96
95 // Returns whether the window show be visible on all workspaces. 97 // Returns whether the window show be visible on all workspaces.
96 virtual void SetVisibleOnAllWorkspaces(bool always_visible) = 0; 98 virtual void SetVisibleOnAllWorkspaces(bool always_visible) = 0;
97 99
98 // Returns false if the underlying native window ignores alpha transparency 100 // Returns false if the underlying native window ignores alpha transparency
99 // when compositing. 101 // when compositing.
100 virtual bool CanHaveAlphaEnabled() const = 0; 102 virtual bool CanHaveAlphaEnabled() const = 0;
101
102 virtual ~NativeAppWindow() {}
103 }; 103 };
104 104
105 } // namespace extensions 105 } // namespace native_app_window
106 106
107 #endif // EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ 107 #endif // COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_H_
OLDNEW
« no previous file with comments | « components/native_app_window/draggable_region.cc ('k') | components/native_app_window/native_app_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698