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

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

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 (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"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "content/public/browser/web_intents_dispatcher.h" 12 #include "content/public/browser/web_intents_dispatcher.h"
13 #include "content/public/common/url_constants.h" 13 #include "content/public/common/url_constants.h"
14 #include "content/public/common/bindings_policy.h" 14 #include "content/public/common/bindings_policy.h"
15 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
16 #include "webkit/glue/web_intent_data.h" 16 #include "webkit/glue/web_intent_data.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 WebContentsDelegate::WebContentsDelegate() { 20 WebContentsDelegate::WebContentsDelegate() {
21 } 21 }
22 22
23 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, 23 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source,
24 const OpenURLParams& params) { 24 const OpenURLParams& params) {
25 return NULL; 25 return NULL;
26 } 26 }
27 27
28 bool WebContentsDelegate::AddNewContents(WebContents* source,
29 WebContents* new_contents,
30 WindowOpenDisposition disposition,
31 const gfx::Rect& initial_pos,
32 bool user_gesture) {
33 return true;
34 }
35
28 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { 36 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const {
29 return false; 37 return false;
30 } 38 }
31 39
32 bool WebContentsDelegate::IsApplication() const { return false; } 40 bool WebContentsDelegate::IsApplication() const { return false; }
33 41
34 bool WebContentsDelegate::CanLoadDataURLsInWebUI() const { return false; } 42 bool WebContentsDelegate::CanLoadDataURLsInWebUI() const { return false; }
35 43
36 gfx::Rect WebContentsDelegate::GetRootWindowResizerRect() const { 44 gfx::Rect WebContentsDelegate::GetRootWindowResizerRect() const {
37 return gfx::Rect(); 45 return gfx::Rect();
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); 185 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end());
178 attached_contents_.insert(web_contents); 186 attached_contents_.insert(web_contents);
179 } 187 }
180 188
181 void WebContentsDelegate::Detach(WebContents* web_contents) { 189 void WebContentsDelegate::Detach(WebContents* web_contents) {
182 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); 190 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end());
183 attached_contents_.erase(web_contents); 191 attached_contents_.erase(web_contents);
184 } 192 }
185 193
186 } // namespace content 194 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698