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

Side by Side Diff: content/public/browser/web_contents_delegate.cc

Issue 11416013: Move RequestPpapiBrokerPermission from WebContentsObserver to WebContentsDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 8 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/browser/web_contents_delegate.h" 5 #include "content/public/browser/web_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 void WebContentsDelegate::WebIntentDispatch( 138 void WebContentsDelegate::WebIntentDispatch(
139 WebContents* web_contents, 139 WebContents* web_contents,
140 WebIntentsDispatcher* intents_dispatcher) { 140 WebIntentsDispatcher* intents_dispatcher) {
141 // The caller passes this method ownership of the |intents_dispatcher|, but 141 // The caller passes this method ownership of the |intents_dispatcher|, but
142 // this empty implementation will not use it, so we delete it immediately. 142 // this empty implementation will not use it, so we delete it immediately.
143 delete intents_dispatcher; 143 delete intents_dispatcher;
144 } 144 }
145 145
146 bool WebContentsDelegate::RequestPpapiBrokerPermission(
147 WebContents* web_contents,
148 const GURL& url,
149 const FilePath& plugin_path,
150 const base::Callback<void(bool)>& callback) {
151 return false;
152 }
153
146 WebContentsDelegate::~WebContentsDelegate() { 154 WebContentsDelegate::~WebContentsDelegate() {
147 while (!attached_contents_.empty()) { 155 while (!attached_contents_.empty()) {
148 WebContents* web_contents = *attached_contents_.begin(); 156 WebContents* web_contents = *attached_contents_.begin();
149 web_contents->SetDelegate(NULL); 157 web_contents->SetDelegate(NULL);
150 } 158 }
151 DCHECK(attached_contents_.empty()); 159 DCHECK(attached_contents_.empty());
152 } 160 }
153 161
154 void WebContentsDelegate::Attach(WebContents* web_contents) { 162 void WebContentsDelegate::Attach(WebContents* web_contents) {
155 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); 163 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end());
156 attached_contents_.insert(web_contents); 164 attached_contents_.insert(web_contents);
157 } 165 }
158 166
159 void WebContentsDelegate::Detach(WebContents* web_contents) { 167 void WebContentsDelegate::Detach(WebContents* web_contents) {
160 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); 168 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end());
161 attached_contents_.erase(web_contents); 169 attached_contents_.erase(web_contents);
162 } 170 }
163 171
164 } // namespace content 172 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698