Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: content/public/common/window_container_type.h

Issue 15994016: Support custom window features, such as 'moo=foo'. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,71 @@
#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"
jam 2013/06/10 18:13:57 see crbug.com/237267, people are working on removi
dreijer 2013/07/19 16:15:36 Well, so the problem here is that this class (Wind
+
namespace WebKit {
-struct WebWindowFeatures;
+// Converts the Blink-specific WebWindowFeatures struct to a local
+// WindowFeatures that can be passed to other parts of Chromium.
+struct WindowFeatures {
jam 2013/06/10 18:13:57 only classes defined in webkit itself can be in th
+ WindowFeatures()
+ : x_set(false),
+ y_set(false),
+ width_set(false),
+ height_set(false),
+ menubar_visible(true),
+ statusbar_visible(true),
+ toolbar_visible(true),
+ locationbar_visible(true),
+ scrollbars_visible(true),
+ resizable(true),
+ fullscreen(false),
+ dialog(false) {
+ }
-}
+ explicit WindowFeatures(const WebKit::WebWindowFeatures& f)
+ : x(f.x),
+ x_set(f.xSet),
+ y(f.y),
+ y_set(f.ySet),
+ width(f.width),
+ width_set(f.widthSet),
+ height(f.height),
+ height_set(f.heightSet),
+ menubar_visible(f.menuBarVisible),
+ statusbar_visible(f.statusBarVisible),
+ toolbar_visible(f.toolBarVisible),
+ locationbar_visible(f.locationBarVisible),
+ scrollbars_visible(f.scrollbarsVisible),
+ resizable(f.resizable),
+ fullscreen(f.fullscreen),
+ dialog(f.dialog) {
+ for (size_t i = 0; i < f.additionalFeatures.size(); ++i)
+ additional_features.push_back(f.additionalFeatures[i]);
+ }
+ float x;
+ bool x_set;
+ float y;
+ bool y_set;
+ float width;
+ bool width_set;
+ float height;
+ bool height_set;
+ bool menubar_visible;
+ bool statusbar_visible;
+ bool toolbar_visible;
+ bool locationbar_visible;
+ bool scrollbars_visible;
+ bool resizable;
+ bool fullscreen;
+ bool dialog;
+ std::vector<string16> additional_features;
+};
+
+} // namespace WebKit
+
// "Container" types which can be requested via the window.open feature
// string.
enum WindowContainerType {
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698