OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_DELEGATE_H_ |
| 6 #define COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_DELEGATE_H_ |
| 7 |
| 8 #include "base/strings/string16.h" |
| 9 #include "components/native_app_window/app_window_create_params.h" |
| 10 |
| 11 namespace content { |
| 12 class BrowserContext; |
| 13 class WebContents; |
| 14 } |
| 15 |
| 16 namespace native_app_window { |
| 17 |
| 18 class NativeAppWindowDelegate { |
| 19 public: |
| 20 virtual content::WebContents* GetWebContents() = 0; |
| 21 virtual content::BrowserContext* GetBrowserContext() = 0; |
| 22 |
| 23 // Call to notify ShellRegistry and delete the window. Subclasses should |
| 24 // invoke this method instead of using "delete this". |
| 25 virtual void OnNativeClose() = 0; |
| 26 |
| 27 // Should be called by native implementations when the window size, position, |
| 28 // or minimized/maximized state has changed. |
| 29 virtual void OnNativeWindowChanged() = 0; |
| 30 |
| 31 // Should be called by native implementations when the window is activated. |
| 32 virtual void OnNativeWindowActivated() = 0; |
| 33 |
| 34 // Whether the app window wants to be alpha enabled. |
| 35 virtual bool RequestedAlphaEnabled() const = 0; |
| 36 |
| 37 // NativeAppWindows should call this to determine what the window's title |
| 38 // is on startup and from within UpdateWindowTitle(). |
| 39 virtual base::string16 GetTitle() const = 0; |
| 40 |
| 41 virtual native_app_window::WindowType GetWindowType() const = 0; |
| 42 |
| 43 virtual bool WindowTypeIsPanel() const = 0; |
| 44 }; |
| 45 |
| 46 } // namespace native_app_window |
| 47 |
| 48 #endif // COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_DELEGATE_H_ |
OLD | NEW |