mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
Fix cpplint errors in devtools_window.cc
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user