| OLD | NEW |
| 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 EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ |
| 6 #define EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ | 6 #define EXTENSIONS_BROWSER_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" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 virtual void UpdateDraggableRegions( | 47 virtual void UpdateDraggableRegions( |
| 48 const std::vector<DraggableRegion>& regions) = 0; | 48 const std::vector<DraggableRegion>& regions) = 0; |
| 49 | 49 |
| 50 // Returns the region used by frameless windows for dragging. May return NULL. | 50 // Returns the region used by frameless windows for dragging. May return NULL. |
| 51 virtual SkRegion* GetDraggableRegion() = 0; | 51 virtual SkRegion* GetDraggableRegion() = 0; |
| 52 | 52 |
| 53 // Called when the window shape is changed. If |region| is NULL then the | 53 // Called when the window shape is changed. If |region| is NULL then the |
| 54 // window is restored to the default shape. | 54 // window is restored to the default shape. |
| 55 virtual void UpdateShape(scoped_ptr<SkRegion> region) = 0; | 55 virtual void UpdateShape(scoped_ptr<SkRegion> region) = 0; |
| 56 | 56 |
| 57 // Set whether the window should receive all keyboard events including task |
| 58 // switching keys. |
| 59 virtual void SetInterceptAllKeys(bool want_all_keys) = 0; |
| 60 |
| 57 // Allows the window to handle unhandled keyboard messages coming back from | 61 // Allows the window to handle unhandled keyboard messages coming back from |
| 58 // the renderer. | 62 // the renderer. |
| 59 virtual void HandleKeyboardEvent( | 63 virtual void HandleKeyboardEvent( |
| 60 const content::NativeWebKeyboardEvent& event) = 0; | 64 const content::NativeWebKeyboardEvent& event) = 0; |
| 61 | 65 |
| 62 // Returns true if the window has no frame, as for a window opened by | 66 // Returns true if the window has no frame, as for a window opened by |
| 63 // chrome.app.window.create with the option 'frame' set to 'none'. | 67 // chrome.app.window.create with the option 'frame' set to 'none'. |
| 64 virtual bool IsFrameless() const = 0; | 68 virtual bool IsFrameless() const = 0; |
| 65 | 69 |
| 66 // Returns information about the window's frame. | 70 // Returns information about the window's frame. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // Returns false if the underlying native window ignores alpha transparency | 102 // Returns false if the underlying native window ignores alpha transparency |
| 99 // when compositing. | 103 // when compositing. |
| 100 virtual bool CanHaveAlphaEnabled() const = 0; | 104 virtual bool CanHaveAlphaEnabled() const = 0; |
| 101 | 105 |
| 102 ~NativeAppWindow() override {} | 106 ~NativeAppWindow() override {} |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 } // namespace extensions | 109 } // namespace extensions |
| 106 | 110 |
| 107 #endif // EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ | 111 #endif // EXTENSIONS_BROWSER_APP_WINDOW_NATIVE_APP_WINDOW_H_ |
| OLD | NEW |