| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef APPS_NATIVE_APP_WINDOW_H_ | |
| 6 #define APPS_NATIVE_APP_WINDOW_H_ | |
| 7 | |
| 8 #include "apps/shell_window.h" | |
| 9 #include "components/web_modal/web_contents_modal_dialog_host.h" | |
| 10 #include "ui/base/base_window.h" | |
| 11 #include "ui/gfx/insets.h" | |
| 12 | |
| 13 namespace apps { | |
| 14 | |
| 15 // This is an interface to a native implementation of a shell window, used for | |
| 16 // new-style packaged apps. Shell windows contain a web contents, but no tabs | |
| 17 // or URL bar. | |
| 18 class NativeAppWindow : public ui::BaseWindow, | |
| 19 public web_modal::WebContentsModalDialogHost { | |
| 20 public: | |
| 21 // Called when the draggable regions are changed. | |
| 22 virtual void UpdateDraggableRegions( | |
| 23 const std::vector<extensions::DraggableRegion>& regions) = 0; | |
| 24 | |
| 25 virtual void SetFullscreen(bool fullscreen) = 0; | |
| 26 virtual bool IsFullscreenOrPending() const = 0; | |
| 27 | |
| 28 // Returns true if the window is a panel that has been detached. | |
| 29 virtual bool IsDetached() const = 0; | |
| 30 | |
| 31 // Called when the icon of the window changes. | |
| 32 virtual void UpdateWindowIcon() = 0; | |
| 33 | |
| 34 // Called when the title of the window changes. | |
| 35 virtual void UpdateWindowTitle() = 0; | |
| 36 | |
| 37 // Allows the window to handle unhandled keyboard messages coming back from | |
| 38 // the renderer. | |
| 39 virtual void HandleKeyboardEvent( | |
| 40 const content::NativeWebKeyboardEvent& event) = 0; | |
| 41 | |
| 42 // TODO(jianli): once http://crbug.com/123007 is fixed, we'll no longer need | |
| 43 // this. | |
| 44 virtual void RenderViewHostChanged() = 0; | |
| 45 | |
| 46 // Returns the difference between the window bounds (including titlebar and | |
| 47 // borders) and the content bounds, if any. | |
| 48 virtual gfx::Insets GetFrameInsets() const = 0; | |
| 49 | |
| 50 virtual ~NativeAppWindow() {} | |
| 51 }; | |
| 52 | |
| 53 } // namespace apps | |
| 54 | |
| 55 #endif // APPS_NATIVE_APP_WINDOW_H_ | |
| OLD | NEW |