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

Side by Side Diff: content/public/renderer/window_features_converter.cc

Issue 2905283003: Remove a bunch of dead code around WindowFeatures (Closed)
Patch Set: Use WebWindowFeatures everywhere 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "content/public/renderer/window_features_converter.h" 5 #include "content/public/renderer/window_features_converter.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 blink::mojom::WindowFeaturesPtr ConvertWebWindowFeaturesToMojoWindowFeatures( 9 blink::mojom::WindowFeaturesPtr ConvertWebWindowFeaturesToMojoWindowFeatures(
10 const blink::WebWindowFeatures& web_window_features) { 10 const blink::WebWindowFeatures& web_window_features) {
11 blink::mojom::WindowFeaturesPtr result = blink::mojom::WindowFeatures::New(); 11 blink::mojom::WindowFeaturesPtr result = blink::mojom::WindowFeatures::New();
12 result->x = web_window_features.x; 12 result->x = web_window_features.x;
13 result->has_x = web_window_features.x_set; 13 result->has_x = web_window_features.x_set;
14 result->y = web_window_features.y; 14 result->y = web_window_features.y;
15 result->has_y = web_window_features.y_set; 15 result->has_y = web_window_features.y_set;
16 result->width = web_window_features.width; 16 result->width = web_window_features.width;
17 result->has_width = web_window_features.width_set; 17 result->has_width = web_window_features.width_set;
18 result->height = web_window_features.height; 18 result->height = web_window_features.height;
19 result->has_height = web_window_features.height_set; 19 result->has_height = web_window_features.height_set;
20 result->menu_bar_visible = web_window_features.menu_bar_visible; 20 result->menu_bar_visible = web_window_features.menu_bar_visible;
21 result->status_bar_visible = web_window_features.status_bar_visible; 21 result->status_bar_visible = web_window_features.status_bar_visible;
22 result->tool_bar_visible = web_window_features.tool_bar_visible; 22 result->tool_bar_visible = web_window_features.tool_bar_visible;
23 result->location_bar_visible = web_window_features.location_bar_visible;
24 result->scrollbars_visible = web_window_features.scrollbars_visible; 23 result->scrollbars_visible = web_window_features.scrollbars_visible;
25 result->resizable = web_window_features.resizable;
26 result->fullscreen = web_window_features.fullscreen;
27 result->dialog = web_window_features.dialog;
28 return result; 24 return result;
29 } 25 }
30 26
31 blink::WebWindowFeatures ConvertMojoWindowFeaturesToWebWindowFeatures( 27 blink::WebWindowFeatures ConvertMojoWindowFeaturesToWebWindowFeatures(
32 const blink::mojom::WindowFeatures& window_features) { 28 const blink::mojom::WindowFeatures& window_features) {
33 blink::WebWindowFeatures result; 29 blink::WebWindowFeatures result;
34 result.x = window_features.x; 30 result.x = window_features.x;
35 result.x_set = window_features.has_x; 31 result.x_set = window_features.has_x;
36 result.y = window_features.y; 32 result.y = window_features.y;
37 result.y_set = window_features.has_y; 33 result.y_set = window_features.has_y;
38 result.width = window_features.width; 34 result.width = window_features.width;
39 result.width_set = window_features.has_width; 35 result.width_set = window_features.has_width;
40 result.height = window_features.height; 36 result.height = window_features.height;
41 result.height_set = window_features.has_height; 37 result.height_set = window_features.has_height;
42 result.menu_bar_visible = window_features.menu_bar_visible; 38 result.menu_bar_visible = window_features.menu_bar_visible;
43 result.status_bar_visible = window_features.status_bar_visible; 39 result.status_bar_visible = window_features.status_bar_visible;
44 result.tool_bar_visible = window_features.tool_bar_visible; 40 result.tool_bar_visible = window_features.tool_bar_visible;
45 result.location_bar_visible = window_features.location_bar_visible;
46 result.scrollbars_visible = window_features.scrollbars_visible; 41 result.scrollbars_visible = window_features.scrollbars_visible;
47 result.resizable = window_features.resizable;
48 result.fullscreen = window_features.fullscreen;
49 result.dialog = window_features.dialog;
50 return result; 42 return result;
51 } 43 }
52 44
53 } // namespace content 45 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698