Skip to content
Snippets Groups Projects
Commit 5f4b0da9 authored by xiyuan@chromium.org's avatar xiyuan@chromium.org
Browse files

[ChromeOS] Remove PanelBrowserView::Init.

The window size handling in PanelBrowserView::Init seems no longer needed
and would cause problem now.

BUG=chromium-os:8258
TEST=Verify fix for chromium-os:8258.

Review URL: http://codereview.chromium.org/4170010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64922 0039d316-1c4b-4281-b951-d872f2087c98
parent 1161c593
No related merge requests found
......@@ -55,24 +55,6 @@ void PanelBrowserView::LimitBounds(gfx::Rect* bounds) const {
////////////////////////////////////////////////////////////////////////////////
// BrowserView overrides.
void PanelBrowserView::Init() {
::BrowserView::Init();
// The visibility of toolbar is controlled in
// the BrowserView::IsToolbarVisible method.
views::Window* window = frame()->GetWindow();
gfx::NativeWindow native_window = window->GetNativeWindow();
// The window manager needs the min size for popups.
gfx::Rect bounds = window->GetBounds();
LimitBounds(&bounds);
gtk_widget_set_size_request(
GTK_WIDGET(native_window), bounds.width(), bounds.height());
// If we don't explicitly resize here there is a race condition between
// the X Server and the window manager. Windows will appear with a default
// size of 200x200 if this happens.
gtk_window_resize(native_window, bounds.width(), bounds.height());
}
void PanelBrowserView::Show() {
if (panel_controller_.get() == NULL) {
panel_controller_.reset(new PanelController(this, GetNativeHandle()));
......
......@@ -26,7 +26,6 @@ class PanelBrowserView : public ::BrowserView,
explicit PanelBrowserView(Browser* browser);
// BrowserView overrides.
virtual void Init();
virtual void Show();
virtual void SetBounds(const gfx::Rect& bounds);
virtual void Close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment