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

Side by Side Diff: mandoline/ui/desktop_ui/browser_window.cc

Issue 1343773003: Revert of mandoline: Add back/forward support and UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « mandoline/ui/desktop_ui/browser_window.h ('k') | mandoline/ui/desktop_ui/toolbar_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mandoline/ui/desktop_ui/browser_window.h" 5 #include "mandoline/ui/desktop_ui/browser_window.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "components/view_manager/public/cpp/scoped_view_ptr.h" 11 #include "components/view_manager/public/cpp/scoped_view_ptr.h"
12 #include "components/view_manager/public/cpp/view_tree_host_factory.h" 12 #include "components/view_manager/public/cpp/view_tree_host_factory.h"
13 #include "mandoline/ui/aura/native_widget_view_manager.h" 13 #include "mandoline/ui/aura/native_widget_view_manager.h"
14 #include "mandoline/ui/desktop_ui/browser_commands.h" 14 #include "mandoline/ui/desktop_ui/browser_commands.h"
15 #include "mandoline/ui/desktop_ui/browser_manager.h" 15 #include "mandoline/ui/desktop_ui/browser_manager.h"
16 #include "mandoline/ui/desktop_ui/public/interfaces/omnibox.mojom.h" 16 #include "mandoline/ui/desktop_ui/public/interfaces/omnibox.mojom.h"
17 #include "mandoline/ui/desktop_ui/toolbar_view.h"
18 #include "mojo/common/common_type_converters.h" 17 #include "mojo/common/common_type_converters.h"
19 #include "mojo/converters/geometry/geometry_type_converters.h" 18 #include "mojo/converters/geometry/geometry_type_converters.h"
20 #include "mojo/services/tracing/public/cpp/switches.h" 19 #include "mojo/services/tracing/public/cpp/switches.h"
21 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 20 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
22 #include "ui/gfx/canvas.h" 21 #include "ui/gfx/canvas.h"
23 #include "ui/views/background.h" 22 #include "ui/views/background.h"
24 #include "ui/views/controls/button/label_button.h" 23 #include "ui/views/controls/button/label_button.h"
25 #include "ui/views/widget/widget_delegate.h" 24 #include "ui/views/widget/widget_delegate.h"
26 25
27 namespace mandoline { 26 namespace mandoline {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 64
66 //////////////////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////////////////
67 // BrowserWindow, public: 66 // BrowserWindow, public:
68 67
69 BrowserWindow::BrowserWindow(mojo::ApplicationImpl* app, 68 BrowserWindow::BrowserWindow(mojo::ApplicationImpl* app,
70 mojo::ViewTreeHostFactory* host_factory, 69 mojo::ViewTreeHostFactory* host_factory,
71 BrowserManager* manager) 70 BrowserManager* manager)
72 : app_(app), 71 : app_(app),
73 host_client_binding_(this), 72 host_client_binding_(this),
74 manager_(manager), 73 manager_(manager),
75 toolbar_view_(nullptr), 74 omnibox_launcher_(nullptr),
76 progress_bar_(nullptr), 75 progress_bar_(nullptr),
77 root_(nullptr), 76 root_(nullptr),
78 content_(nullptr), 77 content_(nullptr),
79 omnibox_view_(nullptr), 78 omnibox_view_(nullptr),
80 web_view_(this) { 79 web_view_(this) {
81 mojo::ViewTreeHostClientPtr host_client; 80 mojo::ViewTreeHostClientPtr host_client;
82 host_client_binding_.Bind(GetProxy(&host_client)); 81 host_client_binding_.Bind(GetProxy(&host_client));
83 mojo::CreateViewTreeHost(host_factory, host_client.Pass(), this, &host_); 82 mojo::CreateViewTreeHost(host_factory, host_client.Pass(), this, &host_);
84 } 83 }
85 84
(...skipping 15 matching lines...) Expand all
101 Embed(request.Pass()); 100 Embed(request.Pass());
102 } 101 }
103 102
104 void BrowserWindow::Close() { 103 void BrowserWindow::Close() {
105 if (root_) 104 if (root_)
106 mojo::ScopedViewPtr::DeleteViewOrViewManager(root_); 105 mojo::ScopedViewPtr::DeleteViewOrViewManager(root_);
107 else 106 else
108 delete this; 107 delete this;
109 } 108 }
110 109
111 void BrowserWindow::ShowOmnibox() {
112 if (!omnibox_.get()) {
113 mojo::URLRequestPtr request(mojo::URLRequest::New());
114 request->url = mojo::String::From("mojo:omnibox");
115 omnibox_connection_ = app_->ConnectToApplication(request.Pass());
116 omnibox_connection_->AddService<ViewEmbedder>(this);
117 omnibox_connection_->ConnectToService(&omnibox_);
118 omnibox_connection_->SetRemoteServiceProviderConnectionErrorHandler(
119 [this]() {
120 // This will cause the connection to be re-established the next time
121 // we come through this codepath.
122 omnibox_.reset();
123 });
124 }
125 omnibox_->ShowForURL(mojo::String::From(current_url_.spec()));
126 }
127
128 void BrowserWindow::GoBack() {
129 web_view_.web_view()->GoBack();
130 }
131
132 void BrowserWindow::GoForward() {
133 web_view_.web_view()->GoForward();
134 }
135
136 BrowserWindow::~BrowserWindow() { 110 BrowserWindow::~BrowserWindow() {
137 DCHECK(!root_); 111 DCHECK(!root_);
138 manager_->BrowserWindowClosed(this); 112 manager_->BrowserWindowClosed(this);
139 } 113 }
140 114
141 float BrowserWindow::DIPSToPixels(float value) const { 115 float BrowserWindow::DIPSToPixels(float value) const {
142 return value * root_->viewport_metrics().device_pixel_ratio; 116 return value * root_->viewport_metrics().device_pixel_ratio;
143 } 117 }
144 118
145 //////////////////////////////////////////////////////////////////////////////// 119 ////////////////////////////////////////////////////////////////////////////////
(...skipping 19 matching lines...) Expand all
165 content_->SetVisible(true); 139 content_->SetVisible(true);
166 140
167 web_view_.Init(app_, content_); 141 web_view_.Init(app_, content_);
168 142
169 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::CLOSE), 143 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::CLOSE),
170 mojo::KEYBOARD_CODE_W, mojo::EVENT_FLAGS_CONTROL_DOWN); 144 mojo::KEYBOARD_CODE_W, mojo::EVENT_FLAGS_CONTROL_DOWN);
171 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::FOCUS_OMNIBOX), 145 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::FOCUS_OMNIBOX),
172 mojo::KEYBOARD_CODE_L, mojo::EVENT_FLAGS_CONTROL_DOWN); 146 mojo::KEYBOARD_CODE_L, mojo::EVENT_FLAGS_CONTROL_DOWN);
173 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::NEW_WINDOW), 147 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::NEW_WINDOW),
174 mojo::KEYBOARD_CODE_N, mojo::EVENT_FLAGS_CONTROL_DOWN); 148 mojo::KEYBOARD_CODE_N, mojo::EVENT_FLAGS_CONTROL_DOWN);
175 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::GO_BACK),
176 mojo::KEYBOARD_CODE_LEFT, mojo::EVENT_FLAGS_ALT_DOWN);
177 host_->AddAccelerator(static_cast<uint32_t>(BrowserCommand::GO_FORWARD),
178 mojo::KEYBOARD_CODE_RIGHT, mojo::EVENT_FLAGS_ALT_DOWN);
179 149
180 // Now that we're ready, load the default url. 150 // Now that we're ready, load the default url.
181 LoadURL(default_url_); 151 LoadURL(default_url_);
182 152
183 // Record the time spent opening initial tabs, used for performance testing. 153 // Record the time spent opening initial tabs, used for performance testing.
184 const base::TimeDelta open_tabs_delta = base::Time::Now() - display_time; 154 const base::TimeDelta open_tabs_delta = base::Time::Now() - display_time;
185 155
186 // Record the browser startup time metrics, used for performance testing. 156 // Record the browser startup time metrics, used for performance testing.
187 static bool recorded_browser_startup_metrics = false; 157 static bool recorded_browser_startup_metrics = false;
188 if (!recorded_browser_startup_metrics && 158 if (!recorded_browser_startup_metrics &&
(...skipping 23 matching lines...) Expand all
212 switch (static_cast<BrowserCommand>(id)) { 182 switch (static_cast<BrowserCommand>(id)) {
213 case BrowserCommand::CLOSE: 183 case BrowserCommand::CLOSE:
214 Close(); 184 Close();
215 break; 185 break;
216 case BrowserCommand::NEW_WINDOW: 186 case BrowserCommand::NEW_WINDOW:
217 manager_->CreateBrowser(GURL()); 187 manager_->CreateBrowser(GURL());
218 break; 188 break;
219 case BrowserCommand::FOCUS_OMNIBOX: 189 case BrowserCommand::FOCUS_OMNIBOX:
220 ShowOmnibox(); 190 ShowOmnibox();
221 break; 191 break;
222 case BrowserCommand::GO_BACK:
223 GoBack();
224 break;
225 case BrowserCommand::GO_FORWARD:
226 GoForward();
227 break;
228 default: 192 default:
229 NOTREACHED(); 193 NOTREACHED();
230 break; 194 break;
231 } 195 }
232 } 196 }
233 197
234 //////////////////////////////////////////////////////////////////////////////// 198 ////////////////////////////////////////////////////////////////////////////////
235 // BrowserWindow, web_view::mojom::WebViewClient implementation: 199 // BrowserWindow, web_view::mojom::WebViewClient implementation:
236 200
237 void BrowserWindow::TopLevelNavigate(mojo::URLRequestPtr request) { 201 void BrowserWindow::TopLevelNavigate(mojo::URLRequestPtr request) {
238 Embed(request.Pass()); 202 Embed(request.Pass());
239 } 203 }
240 204
241 void BrowserWindow::LoadingStateChanged(bool is_loading) { 205 void BrowserWindow::LoadingStateChanged(bool is_loading) {
242 progress_bar_->SetIsLoading(is_loading); 206 progress_bar_->SetIsLoading(is_loading);
243 } 207 }
244 208
245 void BrowserWindow::ProgressChanged(double progress) { 209 void BrowserWindow::ProgressChanged(double progress) {
246 progress_bar_->SetProgress(progress); 210 progress_bar_->SetProgress(progress);
247 } 211 }
248 212
249 void BrowserWindow::BackForwardChanged(
250 web_view::mojom::ButtonState back_button,
251 web_view::mojom::ButtonState forward_button) {
252 toolbar_view_->SetBackForwardEnabled(
253 back_button == web_view::mojom::ButtonState::BUTTON_STATE_ENABLED,
254 forward_button == web_view::mojom::ButtonState::BUTTON_STATE_ENABLED);
255 }
256
257 void BrowserWindow::TitleChanged(const mojo::String& title) { 213 void BrowserWindow::TitleChanged(const mojo::String& title) {
258 base::string16 formatted = 214 base::string16 formatted =
259 title.is_null() ? base::ASCIIToUTF16("Untitled") 215 title.is_null() ? base::ASCIIToUTF16("Untitled")
260 : title.To<base::string16>() + 216 : title.To<base::string16>() +
261 base::ASCIIToUTF16(" - Mandoline"); 217 base::ASCIIToUTF16(" - Mandoline");
262 host_->SetTitle(mojo::String::From(formatted)); 218 host_->SetTitle(mojo::String::From(formatted));
263 } 219 }
264 220
265 //////////////////////////////////////////////////////////////////////////////// 221 ////////////////////////////////////////////////////////////////////////////////
266 // BrowserWindow, ViewEmbedder implementation: 222 // BrowserWindow, ViewEmbedder implementation:
267 223
268 void BrowserWindow::Embed(mojo::URLRequestPtr request) { 224 void BrowserWindow::Embed(mojo::URLRequestPtr request) {
269 const std::string string_url = request->url.To<std::string>(); 225 const std::string string_url = request->url.To<std::string>();
270 if (string_url == "mojo:omnibox") { 226 if (string_url == "mojo:omnibox") {
271 EmbedOmnibox(); 227 EmbedOmnibox();
272 return; 228 return;
273 } 229 }
274 230
275 GURL gurl(string_url); 231 GURL gurl(string_url);
276 bool changed = current_url_ != gurl; 232 bool changed = current_url_ != gurl;
277 current_url_ = gurl; 233 current_url_ = gurl;
278 if (changed) 234 if (changed)
279 toolbar_view_->SetOmniboxText(base::UTF8ToUTF16(current_url_.spec())); 235 omnibox_launcher_->SetText(base::UTF8ToUTF16(current_url_.spec()));
280 236
281 web_view_.web_view()->LoadRequest(request.Pass()); 237 web_view_.web_view()->LoadRequest(request.Pass());
282 } 238 }
283 239
284 //////////////////////////////////////////////////////////////////////////////// 240 ////////////////////////////////////////////////////////////////////////////////
285 // BrowserWindow, mojo::InterfaceFactory<ViewEmbedder> implementation: 241 // BrowserWindow, mojo::InterfaceFactory<ViewEmbedder> implementation:
286 242
287 void BrowserWindow::Create(mojo::ApplicationConnection* connection, 243 void BrowserWindow::Create(mojo::ApplicationConnection* connection,
288 mojo::InterfaceRequest<ViewEmbedder> request) { 244 mojo::InterfaceRequest<ViewEmbedder> request) {
289 view_embedder_bindings_.AddBinding(this, request.Pass()); 245 view_embedder_bindings_.AddBinding(this, request.Pass());
290 } 246 }
291 247
292 //////////////////////////////////////////////////////////////////////////////// 248 ////////////////////////////////////////////////////////////////////////////////
293 // BrowserWindow, views::LayoutManager implementation: 249 // BrowserWindow, views::LayoutManager implementation:
294 250
295 gfx::Size BrowserWindow::GetPreferredSize(const views::View* view) const { 251 gfx::Size BrowserWindow::GetPreferredSize(const views::View* view) const {
296 return gfx::Size(); 252 return gfx::Size();
297 } 253 }
298 254
299 void BrowserWindow::Layout(views::View* host) { 255 void BrowserWindow::Layout(views::View* host) {
300 // TODO(fsamuel): All bounds should be in physical pixels. 256 // TODO(fsamuel): All bounds should be in physical pixels.
301 gfx::Rect bounds_in_physical_pixels(host->bounds()); 257 gfx::Rect bounds_in_physical_pixels(host->bounds());
302 float inverse_device_pixel_ratio = 258 float inverse_device_pixel_ratio =
303 1.0f / root_->viewport_metrics().device_pixel_ratio; 259 1.0f / root_->viewport_metrics().device_pixel_ratio;
304 260
305 gfx::Rect toolbar_bounds = gfx::ScaleToEnclosingRect( 261 gfx::Rect omnibox_launcher_bounds = gfx::ScaleToEnclosingRect(
306 bounds_in_physical_pixels, inverse_device_pixel_ratio); 262 bounds_in_physical_pixels, inverse_device_pixel_ratio);
307 toolbar_bounds.Inset(10, 10, 10, toolbar_bounds.height() - 40); 263 omnibox_launcher_bounds.Inset(10, 10, 10,
308 toolbar_view_->SetBoundsRect(toolbar_bounds); 264 omnibox_launcher_bounds.height() - 40);
265 omnibox_launcher_->SetBoundsRect(omnibox_launcher_bounds);
309 266
310 gfx::Rect progress_bar_bounds(toolbar_bounds.x(), toolbar_bounds.bottom() + 2, 267 gfx::Rect progress_bar_bounds(omnibox_launcher_bounds.x(),
311 toolbar_bounds.width(), 5); 268 omnibox_launcher_bounds.bottom() + 2,
269 omnibox_launcher_bounds.width(),
270 5);
271 progress_bar_->SetBoundsRect(progress_bar_bounds);
312 272
313 // The content view bounds are in physical pixels. 273 // The content view bounds are in physical pixels.
314 mojo::Rect content_bounds_mojo; 274 mojo::Rect content_bounds_mojo;
315 content_bounds_mojo.x = DIPSToPixels(progress_bar_bounds.x()); 275 content_bounds_mojo.x = DIPSToPixels(progress_bar_bounds.x());
316 content_bounds_mojo.y = DIPSToPixels(progress_bar_bounds.bottom()+ 10); 276 content_bounds_mojo.y = DIPSToPixels(progress_bar_bounds.bottom()+ 10);
317 content_bounds_mojo.width = DIPSToPixels(progress_bar_bounds.width()); 277 content_bounds_mojo.width = DIPSToPixels(progress_bar_bounds.width());
318 content_bounds_mojo.height = 278 content_bounds_mojo.height =
319 host->bounds().height() - content_bounds_mojo.y - DIPSToPixels(10); 279 host->bounds().height() - content_bounds_mojo.y - DIPSToPixels(10);
320 content_->SetBounds(content_bounds_mojo); 280 content_->SetBounds(content_bounds_mojo);
321 281
322 // The omnibox view bounds are in physical pixels. 282 // The omnibox view bounds are in physical pixels.
323 omnibox_view_->SetBounds( 283 omnibox_view_->SetBounds(
324 mojo::TypeConverter<mojo::Rect, gfx::Rect>::Convert( 284 mojo::TypeConverter<mojo::Rect, gfx::Rect>::Convert(
325 bounds_in_physical_pixels)); 285 bounds_in_physical_pixels));
286
326 } 287 }
327 288
328 //////////////////////////////////////////////////////////////////////////////// 289 ////////////////////////////////////////////////////////////////////////////////
290 // BrowserWindow, views::ButtonListener implementation:
291
292 void BrowserWindow::ButtonPressed(views::Button* sender,
293 const ui::Event& event) {
294 DCHECK_EQ(sender, omnibox_launcher_);
295 ShowOmnibox();
296 }
297
298 ////////////////////////////////////////////////////////////////////////////////
329 // BrowserWindow, private: 299 // BrowserWindow, private:
330 300
331 void BrowserWindow::Init(mojo::View* root) { 301 void BrowserWindow::Init(mojo::View* root) {
332 DCHECK_GT(root->viewport_metrics().device_pixel_ratio, 0); 302 DCHECK_GT(root->viewport_metrics().device_pixel_ratio, 0);
333 if (!aura_init_) 303 if (!aura_init_)
334 aura_init_.reset(new AuraInit(root, app_->shell())); 304 aura_init_.reset(new AuraInit(root, app_->shell()));
335 305
336 root_ = root; 306 root_ = root;
337 omnibox_view_ = root_->connection()->CreateView(); 307 omnibox_view_ = root_->connection()->CreateView();
338 root_->AddChild(omnibox_view_); 308 root_->AddChild(omnibox_view_);
339 309
340 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; 310 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
341 widget_delegate->GetContentsView()->set_background( 311 widget_delegate->GetContentsView()->set_background(
342 views::Background::CreateSolidBackground(0xFFDDDDDD)); 312 views::Background::CreateSolidBackground(0xFFDDDDDD));
343 toolbar_view_ = new ToolbarView(this); 313 omnibox_launcher_ =
314 new views::LabelButton(this, base::ASCIIToUTF16("Open Omnibox"));
344 progress_bar_ = new ProgressView; 315 progress_bar_ = new ProgressView;
345 widget_delegate->GetContentsView()->AddChildView(toolbar_view_); 316
317 widget_delegate->GetContentsView()->AddChildView(omnibox_launcher_);
346 widget_delegate->GetContentsView()->AddChildView(progress_bar_); 318 widget_delegate->GetContentsView()->AddChildView(progress_bar_);
347 widget_delegate->GetContentsView()->SetLayoutManager(this); 319 widget_delegate->GetContentsView()->SetLayoutManager(this);
348 320
349 views::Widget* widget = new views::Widget; 321 views::Widget* widget = new views::Widget;
350 views::Widget::InitParams params( 322 views::Widget::InitParams params(
351 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 323 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
352 params.native_widget = 324 params.native_widget =
353 new NativeWidgetViewManager(widget, app_->shell(), root_); 325 new NativeWidgetViewManager(widget, app_->shell(), root_);
354 params.delegate = widget_delegate; 326 params.delegate = widget_delegate;
355 params.bounds = root_->bounds().To<gfx::Rect>(); 327 params.bounds = root_->bounds().To<gfx::Rect>();
356 widget->Init(params); 328 widget->Init(params);
357 widget->Show(); 329 widget->Show();
358 root_->SetFocus(); 330 root_->SetFocus();
359 } 331 }
360 332
333 void BrowserWindow::ShowOmnibox() {
334 if (!omnibox_.get()) {
335 mojo::URLRequestPtr request(mojo::URLRequest::New());
336 request->url = mojo::String::From("mojo:omnibox");
337 omnibox_connection_ = app_->ConnectToApplication(request.Pass());
338 omnibox_connection_->AddService<ViewEmbedder>(this);
339 omnibox_connection_->ConnectToService(&omnibox_);
340 omnibox_connection_->SetRemoteServiceProviderConnectionErrorHandler(
341 [this]() {
342 // This will cause the connection to be re-established the next time
343 // we come through this codepath.
344 omnibox_.reset();
345 });
346 }
347 omnibox_->ShowForURL(mojo::String::From(current_url_.spec()));
348 }
349
361 void BrowserWindow::EmbedOmnibox() { 350 void BrowserWindow::EmbedOmnibox() {
362 mojo::ViewTreeClientPtr view_tree_client; 351 mojo::ViewTreeClientPtr view_tree_client;
363 omnibox_->GetViewTreeClient(GetProxy(&view_tree_client)); 352 omnibox_->GetViewTreeClient(GetProxy(&view_tree_client));
364 omnibox_view_->Embed(view_tree_client.Pass()); 353 omnibox_view_->Embed(view_tree_client.Pass());
365 354
366 // TODO(beng): This should be handled sufficiently by 355 // TODO(beng): This should be handled sufficiently by
367 // OmniboxImpl::ShowWindow() but unfortunately view manager policy 356 // OmniboxImpl::ShowWindow() but unfortunately view manager policy
368 // currently prevents the embedded app from changing window z for 357 // currently prevents the embedded app from changing window z for
369 // its own window. 358 // its own window.
370 omnibox_view_->MoveToFront(); 359 omnibox_view_->MoveToFront();
371 } 360 }
372 361
373 } // namespace mandoline 362 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/desktop_ui/browser_window.h ('k') | mandoline/ui/desktop_ui/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698