From 1595940723e9378aa0ced3bdfe6e2e23979d5361 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Sun, 17 Nov 2013 19:05:21 -0500 Subject: [PATCH] Fix cpplint errors in devtools_window.cc --- brightray/browser/win/devtools_window.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/brightray/browser/win/devtools_window.cc b/brightray/browser/win/devtools_window.cc index 442bffa13c..9fc4b5dba8 100644 --- a/brightray/browser/win/devtools_window.cc +++ b/brightray/browser/win/devtools_window.cc @@ -8,7 +8,8 @@ namespace brightray { -DevToolsWindow* DevToolsWindow::Create(InspectableWebContentsViewWin* controller) { +DevToolsWindow* DevToolsWindow::Create( + InspectableWebContentsViewWin* controller) { return new DevToolsWindow(controller); } @@ -20,13 +21,18 @@ DevToolsWindow::~DevToolsWindow() { } LRESULT DevToolsWindow::OnCreate(UINT, WPARAM, LPARAM, BOOL&) { - SetParent(controller_->inspectable_web_contents()->devtools_web_contents()->GetView()->GetNativeView(), hwnd()); + auto devtools_web_contents = + controller_->inspectable_web_contents()->devtools_web_contents(); + SetParent(devtools_web_contents->GetView()->GetNativeView(), hwnd()); SetWindowText(hwnd(), L"Developer Tools"); return 0; } LRESULT DevToolsWindow::OnDestroy(UINT, WPARAM, LPARAM, BOOL&) { - SetParent(controller_->inspectable_web_contents()->devtools_web_contents()->GetView()->GetNativeView(), ui::GetHiddenWindow()); + auto devtools_web_contents = + controller_->inspectable_web_contents()->devtools_web_contents(); + SetParent( + devtools_web_contents->GetView()->GetNativeView(), ui::GetHiddenWindow()); delete this; return 0; } @@ -35,7 +41,9 @@ LRESULT DevToolsWindow::OnSize(UINT, WPARAM, LPARAM, BOOL&) { RECT rect; GetClientRect(hwnd(), &rect); - SetWindowPos(controller_->inspectable_web_contents()->devtools_web_contents()->GetView()->GetNativeView(), + auto devtools_web_contents = + controller_->inspectable_web_contents()->devtools_web_contents(); + SetWindowPos(devtools_web_contents->GetView()->GetNativeView(), nullptr, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,