Fix cpplint errors in inspectable_web_contents_view_win.cc

This commit is contained in:
Adam Roben 2013-11-17 19:02:49 -05:00
parent 779dfd2baf
commit 073b1c164b

View file

@ -15,11 +15,13 @@ const int kWindowInset = 100;
} }
InspectableWebContentsView* CreateInspectableContentsView(InspectableWebContentsImpl* inspectable_web_contents) { InspectableWebContentsView* CreateInspectableContentsView(
InspectableWebContentsImpl* inspectable_web_contents) {
return new InspectableWebContentsViewWin(inspectable_web_contents); return new InspectableWebContentsViewWin(inspectable_web_contents);
} }
InspectableWebContentsViewWin::InspectableWebContentsViewWin(InspectableWebContentsImpl* inspectable_web_contents) InspectableWebContentsViewWin::InspectableWebContentsViewWin(
InspectableWebContentsImpl* inspectable_web_contents)
: inspectable_web_contents_(inspectable_web_contents) { : inspectable_web_contents_(inspectable_web_contents) {
} }
@ -29,7 +31,8 @@ InspectableWebContentsViewWin::~InspectableWebContentsViewWin() {
} }
gfx::NativeView InspectableWebContentsViewWin::GetNativeView() const { gfx::NativeView InspectableWebContentsViewWin::GetNativeView() const {
return inspectable_web_contents_->GetWebContents()->GetView()->GetNativeView(); auto web_contents = inspectable_web_contents_->GetWebContents();
return web_contents->GetView()->GetNativeView();
} }
void InspectableWebContentsViewWin::ShowDevTools() { void InspectableWebContentsViewWin::ShowDevTools() {
@ -41,7 +44,9 @@ void InspectableWebContentsViewWin::ShowDevTools() {
auto contents_view = inspectable_web_contents_->GetWebContents()->GetView(); auto contents_view = inspectable_web_contents_->GetWebContents()->GetView();
auto size = contents_view->GetContainerSize(); auto size = contents_view->GetContainerSize();
size.Enlarge(-kWindowInset, -kWindowInset); size.Enlarge(-kWindowInset, -kWindowInset);
ui::CenterAndSizeWindow(contents_view->GetNativeView(), devtools_window_->hwnd(), size); ui::CenterAndSizeWindow(contents_view->GetNativeView(),
devtools_window_->hwnd(),
size);
ShowWindow(devtools_window_->hwnd(), SW_SHOWNORMAL); ShowWindow(devtools_window_->hwnd(), SW_SHOWNORMAL);
} }