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

Side by Side Diff: third_party/WebKit/Source/core/page/WindowFeatures.h

Issue 2905283003: Remove a bunch of dead code around WindowFeatures (Closed)
Patch Set: Add missing #include Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2007, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 18 matching lines...) Expand all
29 #ifndef WindowFeatures_h 29 #ifndef WindowFeatures_h
30 #define WindowFeatures_h 30 #define WindowFeatures_h
31 31
32 #include "core/CoreExport.h" 32 #include "core/CoreExport.h"
33 #include "platform/wtf/Allocator.h" 33 #include "platform/wtf/Allocator.h"
34 #include "platform/wtf/HashMap.h" 34 #include "platform/wtf/HashMap.h"
35 #include "platform/wtf/text/WTFString.h" 35 #include "platform/wtf/text/WTFString.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class IntRect;
40
41 struct CORE_EXPORT WindowFeatures { 39 struct CORE_EXPORT WindowFeatures {
42 DISALLOW_NEW(); 40 DISALLOW_NEW();
43 WindowFeatures() 41 WindowFeatures() : WindowFeatures(String()) {}
44 : x(0),
45 x_set(false),
46 y(0),
47 y_set(false),
48 width(0),
49 width_set(false),
50 height(0),
51 height_set(false),
52 menu_bar_visible(true),
53 status_bar_visible(true),
54 tool_bar_visible(true),
55 location_bar_visible(true),
56 scrollbars_visible(true),
57 resizable(true),
58 fullscreen(false),
59 dialog(false),
60 noopener(false) {}
61 explicit WindowFeatures(const String& window_features_string); 42 explicit WindowFeatures(const String& window_features_string);
62 WindowFeatures(const String& dialog_features_string,
Nate Chapin 2017/05/31 16:55:13 Unused.
63 const IntRect& screen_available_rect);
64 43
65 int x; 44 int x;
66 bool x_set; 45 bool x_set;
67 int y; 46 int y;
68 bool y_set; 47 bool y_set;
69 int width; 48 int width;
70 bool width_set; 49 bool width_set;
71 int height; 50 int height;
72 bool height_set; 51 bool height_set;
73 52
74 bool menu_bar_visible; 53 bool menu_bar_visible;
75 bool status_bar_visible; 54 bool status_bar_visible;
76 bool tool_bar_visible; 55 bool tool_bar_visible;
kinuko 2017/06/01 06:39:28 maybe rename this to tool_or_location_bar_visible,
Nate Chapin 2017/06/01 20:57:11 Done (in WebWindowFeatures.h)
77 bool location_bar_visible;
Nate Chapin 2017/05/31 16:55:13 This is *almost* unused on trunk: when deciding wh
78 bool scrollbars_visible; 56 bool scrollbars_visible;
79 bool resizable;
80
81 bool fullscreen;
82 bool dialog;
Nate Chapin 2017/05/31 16:55:13 resizable, fullscreen and dialog are all dead.
83 57
84 bool noopener; 58 bool noopener;
85 59 bool background;
86 Vector<String> additional_features; 60 bool persistent;
Nate Chapin 2017/05/31 16:55:13 This is just used to detect background/persistent
kinuko 2017/06/01 06:39:28 By the way now that core/ can refer to public/web
Nate Chapin 2017/06/01 20:57:11 Moved the constructor logic to CreateWindow.cpp, a
87 61
88 private: 62 private:
89 using DialogFeaturesMap = HashMap<String, String>;
90 static void ParseDialogFeatures(const String&, HashMap<String, String>&);
91 static bool BoolFeature(const DialogFeaturesMap&,
92 const char* key,
93 bool default_value = false);
94 static int IntFeature(const DialogFeaturesMap&,
Nate Chapin 2017/05/31 16:55:13 All this private stuff was just for the unused con
95 const char* key,
96 int min,
97 int max,
98 int default_value);
99 void SetWindowFeature(const String& key_string, const String& value_string); 63 void SetWindowFeature(const String& key_string, const String& value_string);
100 }; 64 };
101 65
102 } // namespace blink 66 } // namespace blink
103 67
104 #endif // WindowFeatures_h 68 #endif // WindowFeatures_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698