code cleanup

This commit is contained in:
deepak1556 2017-01-31 14:55:48 +05:30
parent cbeaa6be87
commit 7a0aff2bae
7 changed files with 21 additions and 22 deletions

View file

@ -23,11 +23,11 @@ const int kDefaultHeight = 300;
} // namespace
WebViewGuestDelegate::WebViewGuestDelegate()
: guest_host_(nullptr),
: embedder_zoom_controller_(nullptr),
guest_host_(nullptr),
auto_size_enabled_(false),
is_full_page_plugin_(false),
api_web_contents_(nullptr) {
}
api_web_contents_(nullptr) {}
WebViewGuestDelegate::~WebViewGuestDelegate() {
}
@ -39,9 +39,11 @@ void WebViewGuestDelegate::Initialize(api::WebContents* api_web_contents) {
void WebViewGuestDelegate::Destroy() {
// Give the content module an opportunity to perform some cleanup.
embedder_zoom_controller_->RemoveObserver(this);
if (embedder_zoom_controller_) {
embedder_zoom_controller_->RemoveObserver(this);
embedder_zoom_controller_ = nullptr;
}
guest_host_->WillDestroy();
embedder_zoom_controller_ = nullptr;
guest_host_ = nullptr;
}