| 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 CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ | 6 #define CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" |
| 9 #include "content/public/common/window_container_type.mojom.h" |
| 10 |
| 8 namespace blink { | 11 namespace blink { |
| 9 | 12 |
| 10 struct WebWindowFeatures; | 13 struct WebWindowFeatures; |
| 11 | 14 |
| 12 } | 15 } |
| 13 | 16 |
| 14 // "Container" types which can be requested via the window.open feature | 17 using WindowContainerType = content::mojom::WindowContainerType; |
| 15 // string. | |
| 16 enum WindowContainerType { | |
| 17 // A window shown in popup or tab. | |
| 18 WINDOW_CONTAINER_TYPE_NORMAL = 0, | |
| 19 | 18 |
| 20 // A window run as a hidden "background" page. | 19 // TODO(rockot): Remove these duplicate definitions by updating all references |
| 21 WINDOW_CONTAINER_TYPE_BACKGROUND, | 20 // to point directly to the mojom enum values. |
| 21 extern const WindowContainerType CONTENT_EXPORT WINDOW_CONTAINER_TYPE_NORMAL; |
| 22 | 22 |
| 23 // A window run as a hidden "background" page that wishes to be started | 23 extern const WindowContainerType CONTENT_EXPORT |
| 24 // upon browser launch and run beyond the lifetime of the pages that | 24 WINDOW_CONTAINER_TYPE_BACKGROUND; |
| 25 // reference it. | |
| 26 WINDOW_CONTAINER_TYPE_PERSISTENT, | |
| 27 | 25 |
| 28 WINDOW_CONTAINER_TYPE_MAX_VALUE = WINDOW_CONTAINER_TYPE_PERSISTENT, | 26 extern const WindowContainerType CONTENT_EXPORT |
| 29 }; | 27 WINDOW_CONTAINER_TYPE_PERSISTENT; |
| 30 | 28 |
| 31 // Conversion function: | 29 // Conversion function: |
| 32 WindowContainerType WindowFeaturesToContainerType( | 30 WindowContainerType WindowFeaturesToContainerType( |
| 33 const blink::WebWindowFeatures& window_features); | 31 const blink::WebWindowFeatures& window_features); |
| 34 | 32 |
| 35 #endif // CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ | 33 #endif // CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ |
| OLD | NEW |