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

Side by Side Diff: chrome/browser/guest_view/guest_view_base.cc

Issue 327363002: Remove adview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More files deleted! Created 6 years, 6 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
« no previous file with comments | « chrome/browser/guest_view/ad_view/ad_view_guest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/guest_view_base.h" 5 #include "chrome/browser/guest_view/guest_view_base.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/guest_view/ad_view/ad_view_guest.h"
10 #include "chrome/browser/guest_view/guest_view_constants.h" 9 #include "chrome/browser/guest_view/guest_view_constants.h"
11 #include "chrome/browser/guest_view/guest_view_manager.h" 10 #include "chrome/browser/guest_view/guest_view_manager.h"
12 #include "chrome/browser/guest_view/web_view/web_view_guest.h" 11 #include "chrome/browser/guest_view/web_view/web_view_guest.h"
13 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/content_settings.h" 13 #include "chrome/common/content_settings.h"
15 #include "content/public/browser/render_frame_host.h" 14 #include "content/public/browser/render_frame_host.h"
16 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
17 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
18 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
19 #include "content/public/common/url_constants.h" 18 #include "content/public/common/url_constants.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // static 87 // static
89 GuestViewBase* GuestViewBase::Create( 88 GuestViewBase* GuestViewBase::Create(
90 int guest_instance_id, 89 int guest_instance_id,
91 WebContents* guest_web_contents, 90 WebContents* guest_web_contents,
92 const std::string& embedder_extension_id, 91 const std::string& embedder_extension_id,
93 const std::string& view_type) { 92 const std::string& view_type) {
94 if (view_type == "webview") { 93 if (view_type == "webview") {
95 return new WebViewGuest(guest_instance_id, 94 return new WebViewGuest(guest_instance_id,
96 guest_web_contents, 95 guest_web_contents,
97 embedder_extension_id); 96 embedder_extension_id);
98 } else if (view_type == "adview") {
99 return new AdViewGuest(guest_instance_id,
100 guest_web_contents,
101 embedder_extension_id);
102 } 97 }
103 NOTREACHED(); 98 NOTREACHED();
104 return NULL; 99 return NULL;
105 } 100 }
106 101
107 // static 102 // static
108 GuestViewBase* GuestViewBase::FromWebContents(WebContents* web_contents) { 103 GuestViewBase* GuestViewBase::FromWebContents(WebContents* web_contents) {
109 WebContentsGuestViewMap* guest_map = webcontents_guestview_map.Pointer(); 104 WebContentsGuestViewMap* guest_map = webcontents_guestview_map.Pointer();
110 WebContentsGuestViewMap::iterator it = guest_map->find(web_contents); 105 WebContentsGuestViewMap::iterator it = guest_map->find(web_contents);
111 return it == guest_map->end() ? NULL : it->second; 106 return it == guest_map->end() ? NULL : it->second;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 272
278 void GuestViewBase::SendQueuedEvents() { 273 void GuestViewBase::SendQueuedEvents() {
279 if (!attached()) 274 if (!attached())
280 return; 275 return;
281 while (!pending_events_.empty()) { 276 while (!pending_events_.empty()) {
282 linked_ptr<Event> event_ptr = pending_events_.front(); 277 linked_ptr<Event> event_ptr = pending_events_.front();
283 pending_events_.pop_front(); 278 pending_events_.pop_front();
284 DispatchEvent(event_ptr.release()); 279 DispatchEvent(event_ptr.release());
285 } 280 }
286 } 281 }
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/ad_view/ad_view_guest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698