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