Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: chrome/browser/guest_view/web_view/web_view_guest.cc

Issue 440463002: Fix display:none issue for <webview>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unnecessary var removal Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/guest_view/web_view/web_view_guest.h" 5 #include "chrome/browser/guest_view/web_view/web_view_guest.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 10 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 373
374 bool WebViewGuest::IsDragAndDropEnabled() const { 374 bool WebViewGuest::IsDragAndDropEnabled() const {
375 return true; 375 return true;
376 } 376 }
377 377
378 void WebViewGuest::WillDestroy() { 378 void WebViewGuest::WillDestroy() {
379 if (!attached() && GetOpener()) 379 if (!attached() && GetOpener())
380 GetOpener()->pending_new_windows_.erase(this); 380 GetOpener()->pending_new_windows_.erase(this);
381 DestroyUnattachedWindows(); 381 DestroyUnattachedWindows();
382
383 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
384 DispatchEventToEmbedder(
385 new GuestViewBase::Event(webview::kEventPluginDestroyed, args.Pass()));
382 } 386 }
383 387
384 bool WebViewGuest::AddMessageToConsole(WebContents* source, 388 bool WebViewGuest::AddMessageToConsole(WebContents* source,
385 int32 level, 389 int32 level,
386 const base::string16& message, 390 const base::string16& message,
387 int32 line_no, 391 int32 line_no,
388 const base::string16& source_id) { 392 const base::string16& source_id) {
389 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 393 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
390 // Log levels are from base/logging.h: LogSeverity. 394 // Log levels are from base/logging.h: LogSeverity.
391 args->SetInteger(webview::kLevel, level); 395 args->SetInteger(webview::kLevel, level);
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 WebViewGuest* guest = 1126 WebViewGuest* guest =
1123 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); 1127 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id);
1124 if (!guest) 1128 if (!guest)
1125 return; 1129 return;
1126 1130
1127 if (!allow) 1131 if (!allow)
1128 guest->Destroy(); 1132 guest->Destroy();
1129 } 1133 }
1130 1134
1131 } // namespace extensions 1135 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698