menu_bar_(NULL),
web_view_(inspectable_web_contents()->GetView()->GetView()),
keyboard_event_handler_(new views::UnhandledKeyboardEventHandler),
+ use_content_size_(false),
resizable_(true) {
options.Get(switches::kResizable, &resizable_);
options.Get(switches::kTitle, &title_);
set_background(views::Background::CreateStandardPanelBackground());
AddChildView(web_view_);
- bool use_content_size;
if (has_frame_ &&
- options.Get(switches::kUseContentSize, &use_content_size) &&
- use_content_size)
+ options.Get(switches::kUseContentSize, &use_content_size_) &&
+ use_content_size_)
bounds = ContentBoundsToWindowBounds(bounds);
window_->CenterWindow(bounds.size());
gfx::Size content_size = GetContentSize();
menu_bar_ = new MenuBar;
AddChildViewAt(menu_bar_, 0);
- SetContentSize(content_size);
+
+ if (use_content_size_)
+ SetContentSize(content_size);
}
menu_bar_->SetMenu(menu_model);
assert.equal contentSize[1], 400
it 'make window created with window size when not used', ->
- # No way to reliably set size when window has not been shown on Linux.
- return if process.platform is 'linux'
-
- contentSize = w.getSize()
- assert.equal contentSize[0], 400
- assert.equal contentSize[1], 400
+ size = w.getSize()
+ assert.equal size[0], 400
+ assert.equal size[1], 400
describe 'beforeunload handler', ->
it 'returning true would not prevent close', (done) ->