Chromium Code Reviews| Index: chrome/browser/ui/extensions/native_shell_window.h |
| diff --git a/chrome/browser/ui/extensions/native_shell_window.h b/chrome/browser/ui/extensions/native_shell_window.h |
| index 96db04ddd855c657c68c9cf8788944979258f137..603a39d84708ed8375d53c8bf7664714998471cb 100644 |
| --- a/chrome/browser/ui/extensions/native_shell_window.h |
| +++ b/chrome/browser/ui/extensions/native_shell_window.h |
| @@ -5,8 +5,10 @@ |
| #ifndef CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ |
| #define CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ |
| +#include "base/memory/scoped_ptr.h" |
| #include "chrome/browser/ui/extensions/shell_window.h" |
| #include "chrome/browser/ui/base_window.h" |
| +#include "third_party/skia/include/core/SkRegion.h" |
| // This is an interface to a native implementation of a shell window, used for |
| // new-style packaged apps. Shell windows contain a web contents, but no tabs |
| @@ -14,18 +16,12 @@ |
| class NativeShellWindow : public BaseWindow { |
| public: |
| // Used by ShellWindow to instantiate the platform-specific ShellWindow code. |
| - static NativeShellWindow* Create(ShellWindow* window, |
| + static NativeShellWindow* Create(ShellWindow* shell_window, |
| const ShellWindow::CreateParams& params); |
| // Called when the draggable regions are changed. |
| virtual void UpdateDraggableRegions( |
| - const std::vector<extensions::DraggableRegion>& regions) {} |
| - |
| - // Called when the draggable regions with the old syntax are changed. |
| - // TODO(jianli): to be removed after WebKit patch that changes the draggable |
| - // region syntax is landed. |
| - virtual void UpdateLegacyDraggableRegions( |
| - const std::vector<extensions::DraggableRegion>& regions) {} |
| + const std::vector<extensions::DraggableRegion>& regions); |
| virtual void SetFullscreen(bool fullscreen) = 0; |
| virtual bool IsFullscreenOrPending() const = 0; |
| @@ -41,7 +37,20 @@ class NativeShellWindow : public BaseWindow { |
| virtual void HandleKeyboardEvent( |
| const content::NativeWebKeyboardEvent& event) = 0; |
| - virtual ~NativeShellWindow() {} |
| + virtual ~NativeShellWindow(); |
| + |
| + // Returns true if point (|x|, |y|) falls within the draggable regions. |
| + bool IsInsideDraggableRegions(int x, int y) const; |
| + |
| + bool frameless() const { return frameless_; } |
| + SkRegion* draggable_regions() const { return draggable_regions_.get(); } |
| + |
| + protected: |
| + explicit NativeShellWindow(const ShellWindow::CreateParams& params); |
| + |
| + private: |
| + bool frameless_; |
|
Ben Goodger (Google)
2012/10/12 16:24:41
since this is an interface, you can't have state l
jianli
2012/10/12 21:39:40
Changed to put the common draggable region convers
|
| + scoped_ptr<SkRegion> draggable_regions_; |
| }; |
| #endif // CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ |