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

Unified Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 137403005: Remove some code inside USE_AURA and OS_WIN ifdefs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/panels/panel_view.cc
===================================================================
--- chrome/browser/ui/views/panels/panel_view.cc (revision 244508)
+++ chrome/browser/ui/views/panels/panel_view.cc (working copy)
@@ -285,8 +285,6 @@
web_view_ = new views::WebView(NULL);
AddChildView(web_view_);
- OnViewWasResized();
-
// Register accelarators supported by panels.
views::FocusManager* focus_manager = GetFocusManager();
const std::map<ui::Accelerator, int>& accelerator_table =
@@ -897,7 +895,6 @@
// |web_view_| might not be created yet when the window is first created.
if (web_view_)
web_view_->SetBounds(0, 0, width(), height());
- OnViewWasResized();
}
gfx::Size PanelView::GetMinimumSize() {
@@ -1130,29 +1127,3 @@
}
}
#endif
-
-void PanelView::OnViewWasResized() {
-#if defined(OS_WIN) && !defined(USE_AURA)
- content::WebContents* web_contents = panel_->GetWebContents();
- if (!web_view_ || !web_contents)
- return;
-
- // When the panel is frameless or has thin frame, the mouse resizing should
- // also be triggered from the part of client area that is close to the window
- // frame.
- int width = web_view_->size().width();
- int height = web_view_->size().height();
- // Compute the thickness of the client area that needs to be counted towards
- // mouse resizing.
- int thickness_for_mouse_resizing =
- kResizeInsideBoundsSize - GetFrameView()->BorderThickness();
- DCHECK(thickness_for_mouse_resizing > 0);
- SkRegion* region = new SkRegion;
- region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op);
- region->op(width - thickness_for_mouse_resizing, 0, width, height,
- SkRegion::kUnion_Op);
- region->op(0, height - thickness_for_mouse_resizing, width, height,
- SkRegion::kUnion_Op);
- web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region);
-#endif
-}

Powered by Google App Engine
This is Rietveld 408576698