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_SHELL_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ |
6 #define CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ |
7 | 7 |
8 #include "chrome/browser/ui/extensions/shell_window.h" | 8 #include "chrome/browser/ui/extensions/shell_window.h" |
9 #include "chrome/browser/ui/base_window.h" | 9 #include "chrome/browser/ui/base_window.h" |
| 10 #include "ui/gfx/insets.h" |
10 | 11 |
11 // This is an interface to a native implementation of a shell window, used for | 12 // This is an interface to a native implementation of a shell window, used for |
12 // new-style packaged apps. Shell windows contain a web contents, but no tabs | 13 // new-style packaged apps. Shell windows contain a web contents, but no tabs |
13 // or URL bar. | 14 // or URL bar. |
14 class NativeShellWindow : public BaseWindow { | 15 class NativeShellWindow : public BaseWindow { |
15 public: | 16 public: |
16 // Used by ShellWindow to instantiate the platform-specific ShellWindow code. | 17 // Used by ShellWindow to instantiate the platform-specific ShellWindow code. |
17 static NativeShellWindow* Create(ShellWindow* window, | 18 static NativeShellWindow* Create(ShellWindow* window, |
18 const ShellWindow::CreateParams& params); | 19 const ShellWindow::CreateParams& params); |
19 | 20 |
(...skipping 12 matching lines...) Expand all Loading... |
32 | 33 |
33 // Allows the window to handle unhandled keyboard messages coming back from | 34 // Allows the window to handle unhandled keyboard messages coming back from |
34 // the renderer. | 35 // the renderer. |
35 virtual void HandleKeyboardEvent( | 36 virtual void HandleKeyboardEvent( |
36 const content::NativeWebKeyboardEvent& event) = 0; | 37 const content::NativeWebKeyboardEvent& event) = 0; |
37 | 38 |
38 // TODO(jianli): once http://crbug.com/123007 is fixed, we'll no longer need | 39 // TODO(jianli): once http://crbug.com/123007 is fixed, we'll no longer need |
39 // this. | 40 // this. |
40 virtual void RenderViewHostChanged() = 0; | 41 virtual void RenderViewHostChanged() = 0; |
41 | 42 |
| 43 // Returns the difference between the window bounds (including titlebar and |
| 44 // borders) and the content bounds, if any. |
| 45 virtual gfx::Insets GetFrameInsets() const = 0; |
| 46 |
42 virtual ~NativeShellWindow() {} | 47 virtual ~NativeShellWindow() {} |
43 }; | 48 }; |
44 | 49 |
45 #endif // CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ | 50 #endif // CHROME_BROWSER_UI_EXTENSIONS_NATIVE_SHELL_WINDOW_H_ |
OLD | NEW |