namespace {
std::map<const content::WebContents*, Evas_Object*> window_map_;
-const int kDefaultWindowWidthDip = 800;
-const int kDefaultWindowHeightDip = 600;
+int window_width_;
+int window_height_;
const char* kFileScheme = "file";
const std::string kViewmodeTypeWindowed = "windowed";
DCHECK(window_);
+ elm_win_screen_size_get(window_, NULL, NULL, &window_width_, &window_height_);
evas_object_smart_callback_add(window_, "delete,request",
OnWindowDeleteRequest, this);
- evas_object_resize(window_, kDefaultWindowWidthDip,
- kDefaultWindowHeightDip);
+ evas_object_resize(window_, window_width_, window_height_);
Evas_Object* box = elm_box_add(window_);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(web_view_, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(box, web_view_);
+ evas_object_resize(web_view_, window_width_, window_height_);
+
web_contents()->Focus();
#if defined(OS_TIZEN)