Fix cpplint errors in devtools_window.cc

This commit is contained in:
Adam Roben 2013-11-17 19:05:21 -05:00
parent 0271ff1964
commit 1595940723

View file

@ -8,7 +8,8 @@
namespace brightray { namespace brightray {
DevToolsWindow* DevToolsWindow::Create(InspectableWebContentsViewWin* controller) { DevToolsWindow* DevToolsWindow::Create(
InspectableWebContentsViewWin* controller) {
return new DevToolsWindow(controller); return new DevToolsWindow(controller);
} }
@ -20,13 +21,18 @@ DevToolsWindow::~DevToolsWindow() {
} }
LRESULT DevToolsWindow::OnCreate(UINT, WPARAM, LPARAM, BOOL&) { 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"); SetWindowText(hwnd(), L"Developer Tools");
return 0; return 0;
} }
LRESULT DevToolsWindow::OnDestroy(UINT, WPARAM, LPARAM, BOOL&) { 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; delete this;
return 0; return 0;
} }
@ -35,7 +41,9 @@ LRESULT DevToolsWindow::OnSize(UINT, WPARAM, LPARAM, BOOL&) {
RECT rect; RECT rect;
GetClientRect(hwnd(), &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, nullptr,
rect.left, rect.top, rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top, rect.right - rect.left, rect.bottom - rect.top,