Chromium Code Reviews| Index: content/public/common/window_container_type.h |
| =================================================================== |
| --- content/public/common/window_container_type.h (revision 198276) |
| +++ content/public/common/window_container_type.h (working copy) |
| @@ -5,12 +5,70 @@ |
| #ifndef CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ |
| #define CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ |
| +#include <vector> |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| + |
| namespace WebKit { |
| -struct WebWindowFeatures; |
| + // Converts the Blink-specific WebWindowFeatures struct to a local |
|
sky
2013/06/04 23:08:33
You should look at the the C++ style guide. This s
|
| + // WindowFeatures that can be passed to other parts of Chromium. |
| + struct WindowFeatures { |
| + float x; |
| + bool xSet; |
| + float y; |
| + bool ySet; |
| + float width; |
| + bool widthSet; |
| + float height; |
| + bool heightSet; |
| + bool menuBarVisible; |
| + bool statusBarVisible; |
| + bool toolBarVisible; |
| + bool locationBarVisible; |
| + bool scrollbarsVisible; |
| + bool resizable; |
| + bool fullscreen; |
| + bool dialog; |
| + std::vector<string16> additionalFeatures; |
| -} |
| + WindowFeatures() |
| + : xSet(false) |
| + , ySet(false) |
| + , widthSet(false) |
| + , heightSet(false) |
| + , menuBarVisible(true) |
| + , statusBarVisible(true) |
| + , toolBarVisible(true) |
| + , locationBarVisible(true) |
| + , scrollbarsVisible(true) |
| + , resizable(true) |
| + , fullscreen(false) |
| + , dialog(false) { |
| + } |
| + explicit WindowFeatures(const WebKit::WebWindowFeatures& f) |
| + : x(f.x) |
| + , xSet(f.xSet) |
| + , y(f.y) |
| + , ySet(f.ySet) |
| + , width(f.width) |
| + , widthSet(f.widthSet) |
| + , height(f.height) |
| + , heightSet(f.heightSet) |
| + , menuBarVisible(f.menuBarVisible) |
| + , statusBarVisible(f.statusBarVisible) |
| + , toolBarVisible(f.toolBarVisible) |
| + , locationBarVisible(f.locationBarVisible) |
| + , scrollbarsVisible(f.scrollbarsVisible) |
| + , resizable(f.resizable) |
| + , fullscreen(f.fullscreen) |
| + , dialog(f.dialog) { |
| + for (size_t i = 0; i < f.additionalFeatures.size(); ++i) |
| + additionalFeatures.push_back(f.additionalFeatures[i]); |
| + } |
| + }; |
| +} // namespace WebKit |
| + |
| // "Container" types which can be requested via the window.open feature |
| // string. |
| enum WindowContainerType { |