store webviewinfo as web contents userdata

This commit is contained in:
Robo 2015-09-03 06:17:58 +05:30
parent 8f59c0b642
commit 03ba9533fb
10 changed files with 114 additions and 54 deletions

View file

@ -5,6 +5,7 @@
#include "atom/browser/web_view_guest_delegate.h"
#include "atom/browser/api/atom_api_web_contents.h"
#include "atom/browser/web_view_constants.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "content/public/browser/guest_host.h"
#include "content/public/browser/render_frame_host.h"
@ -13,13 +14,6 @@
namespace atom {
namespace {
const int kDefaultWidth = 300;
const int kDefaultHeight = 300;
} // namespace
WebViewGuestDelegate::WebViewGuestDelegate()
: guest_opaque_(true),
guest_host_(nullptr),
@ -178,7 +172,7 @@ gfx::Size WebViewGuestDelegate::GetDefaultSize() const {
return embedder_web_contents_->GetRenderWidgetHostView()
->GetVisibleViewportSize();
} else {
return gfx::Size(kDefaultWidth, kDefaultHeight);
return gfx::Size(web_view::kDefaultWidth, web_view::kDefaultHeight);
}
}