| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_EXTENSIONS_NATIVE_APP_WINDOW_H_ | 5 #ifndef APPS_NATIVE_APP_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_EXTENSIONS_NATIVE_APP_WINDOW_H_ | 6 #define APPS_NATIVE_APP_WINDOW_H_ |
| 7 | 7 |
| 8 #include "apps/shell_window.h" | 8 #include "apps/shell_window.h" |
| 9 #include "components/web_modal/web_contents_modal_dialog_host.h" | 9 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 10 #include "ui/base/base_window.h" | 10 #include "ui/base/base_window.h" |
| 11 #include "ui/gfx/insets.h" | 11 #include "ui/gfx/insets.h" |
| 12 | 12 |
| 13 namespace apps { |
| 14 |
| 13 // This is an interface to a native implementation of a shell window, used for | 15 // This is an interface to a native implementation of a shell window, used for |
| 14 // new-style packaged apps. Shell windows contain a web contents, but no tabs | 16 // new-style packaged apps. Shell windows contain a web contents, but no tabs |
| 15 // or URL bar. | 17 // or URL bar. |
| 16 class NativeAppWindow : public ui::BaseWindow, | 18 class NativeAppWindow : public ui::BaseWindow, |
| 17 public web_modal::WebContentsModalDialogHost { | 19 public web_modal::WebContentsModalDialogHost { |
| 18 public: | 20 public: |
| 19 // Used by apps::ShellWindow to instantiate the platform-specific | |
| 20 // apps::ShellWindow code. | |
| 21 static NativeAppWindow* Create(apps::ShellWindow* window, | |
| 22 const apps::ShellWindow::CreateParams& params); | |
| 23 | |
| 24 // Called when the draggable regions are changed. | 21 // Called when the draggable regions are changed. |
| 25 virtual void UpdateDraggableRegions( | 22 virtual void UpdateDraggableRegions( |
| 26 const std::vector<extensions::DraggableRegion>& regions) = 0; | 23 const std::vector<extensions::DraggableRegion>& regions) = 0; |
| 27 | 24 |
| 28 virtual void SetFullscreen(bool fullscreen) = 0; | 25 virtual void SetFullscreen(bool fullscreen) = 0; |
| 29 virtual bool IsFullscreenOrPending() const = 0; | 26 virtual bool IsFullscreenOrPending() const = 0; |
| 30 | 27 |
| 31 // Returns true if the window is a panel that has been detached. | 28 // Returns true if the window is a panel that has been detached. |
| 32 virtual bool IsDetached() const = 0; | 29 virtual bool IsDetached() const = 0; |
| 33 | 30 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 46 // this. | 43 // this. |
| 47 virtual void RenderViewHostChanged() = 0; | 44 virtual void RenderViewHostChanged() = 0; |
| 48 | 45 |
| 49 // Returns the difference between the window bounds (including titlebar and | 46 // Returns the difference between the window bounds (including titlebar and |
| 50 // borders) and the content bounds, if any. | 47 // borders) and the content bounds, if any. |
| 51 virtual gfx::Insets GetFrameInsets() const = 0; | 48 virtual gfx::Insets GetFrameInsets() const = 0; |
| 52 | 49 |
| 53 virtual ~NativeAppWindow() {} | 50 virtual ~NativeAppWindow() {} |
| 54 }; | 51 }; |
| 55 | 52 |
| 56 #endif // CHROME_BROWSER_UI_EXTENSIONS_NATIVE_APP_WINDOW_H_ | 53 } // namespace apps |
| 54 |
| 55 #endif // APPS_NATIVE_APP_WINDOW_H_ |
| OLD | NEW |