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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 8343070: Support dispositon attribute. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 ObserverListBase<TabContentsObserver>::Iterator it(observers_); 272 ObserverListBase<TabContentsObserver>::Iterator it(observers_);
273 TabContentsObserver* observer; 273 TabContentsObserver* observer;
274 while ((observer = it.GetNext()) != NULL) 274 while ((observer = it.GetNext()) != NULL)
275 if (observer->OnMessageReceived(message)) 275 if (observer->OnMessageReceived(message))
276 return true; 276 return true;
277 277
278 bool handled = true; 278 bool handled = true;
279 bool message_is_ok = true; 279 bool message_is_ok = true;
280 IPC_BEGIN_MESSAGE_MAP_EX(TabContents, message, message_is_ok) 280 IPC_BEGIN_MESSAGE_MAP_EX(TabContents, message, message_is_ok)
281 IPC_MESSAGE_HANDLER(IntentsHostMsg_RegisterIntentHandler,
282 OnRegisterIntentHandler)
James Hawkins 2011/10/28 22:25:37 These no longer match the implementation order.
Greg Billock 2011/10/28 23:55:21 Yeah. The impl matched header order. The organizat
281 IPC_MESSAGE_HANDLER(IntentsHostMsg_WebIntentDispatch, 283 IPC_MESSAGE_HANDLER(IntentsHostMsg_WebIntentDispatch,
282 OnWebIntentDispatch) 284 OnWebIntentDispatch)
283 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartProvisionalLoadForFrame, 285 IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartProvisionalLoadForFrame,
284 OnDidStartProvisionalLoadForFrame) 286 OnDidStartProvisionalLoadForFrame)
285 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRedirectProvisionalLoad, 287 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRedirectProvisionalLoad,
286 OnDidRedirectProvisionalLoad) 288 OnDidRedirectProvisionalLoad)
287 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError, 289 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFailProvisionalLoadWithError,
288 OnDidFailProvisionalLoadWithError) 290 OnDidFailProvisionalLoadWithError)
289 IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache, 291 IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache,
290 OnDidLoadResourceFromMemoryCache) 292 OnDidLoadResourceFromMemoryCache)
291 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent, 293 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent,
292 OnDidDisplayInsecureContent) 294 OnDidDisplayInsecureContent)
293 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRunInsecureContent, 295 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRunInsecureContent,
294 OnDidRunInsecureContent) 296 OnDidRunInsecureContent)
295 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentLoadedInFrame, 297 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentLoadedInFrame,
296 OnDocumentLoadedInFrame) 298 OnDocumentLoadedInFrame)
297 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFinishLoad, OnDidFinishLoad) 299 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFinishLoad, OnDidFinishLoad)
298 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions, 300 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions,
299 OnUpdateContentRestrictions) 301 OnUpdateContentRestrictions)
300 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) 302 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
301 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) 303 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
302 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 304 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
303 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL) 305 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL)
304 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) 306 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory)
305 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) 307 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory)
306 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, 308 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler,
307 OnRegisterProtocolHandler) 309 OnRegisterProtocolHandler)
308 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterIntentHandler,
309 OnRegisterIntentHandler)
310 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) 310 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
311 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin) 311 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
312 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 312 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
313 IPC_MESSAGE_UNHANDLED(handled = false) 313 IPC_MESSAGE_UNHANDLED(handled = false)
314 IPC_END_MESSAGE_MAP_EX() 314 IPC_END_MESSAGE_MAP_EX()
315 315
316 if (!message_is_ok) { 316 if (!message_is_ok) {
317 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVD")); 317 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVD"));
318 GetRenderProcessHost()->ReceivedBadMessage(); 318 GetRenderProcessHost()->ReceivedBadMessage();
319 } 319 }
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 1112
1113 void TabContents::OnRegisterProtocolHandler(const std::string& protocol, 1113 void TabContents::OnRegisterProtocolHandler(const std::string& protocol,
1114 const GURL& url, 1114 const GURL& url,
1115 const string16& title) { 1115 const string16& title) {
1116 delegate()->RegisterProtocolHandler(this, protocol, url, title); 1116 delegate()->RegisterProtocolHandler(this, protocol, url, title);
1117 } 1117 }
1118 1118
1119 void TabContents::OnRegisterIntentHandler(const string16& action, 1119 void TabContents::OnRegisterIntentHandler(const string16& action,
1120 const string16& type, 1120 const string16& type,
1121 const string16& href, 1121 const string16& href,
1122 const string16& title) { 1122 const string16& title,
1123 delegate()->RegisterIntentHandler(this, action, type, href, title); 1123 const string16& disposition) {
1124 delegate()->RegisterIntentHandler(
1125 this, action, type, href, title, disposition);
1124 } 1126 }
1125 1127
1126 void TabContents::OnWebIntentDispatch(const IPC::Message& message, 1128 void TabContents::OnWebIntentDispatch(const IPC::Message& message,
1127 const webkit_glue::WebIntentData& intent, 1129 const webkit_glue::WebIntentData& intent,
1128 int intent_id) { 1130 int intent_id) {
1129 delegate()->WebIntentDispatch(this, message.routing_id(), intent, intent_id); 1131 delegate()->WebIntentDispatch(this, message.routing_id(), intent, intent_id);
1130 } 1132 }
1131 1133
1132 void TabContents::OnFindReply(int request_id, 1134 void TabContents::OnFindReply(int request_id,
1133 int number_of_matches, 1135 int number_of_matches,
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 2001
2000 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2002 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2001 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2003 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2002 rwh_view->SetSize(view()->GetContainerSize()); 2004 rwh_view->SetSize(view()->GetContainerSize());
2003 } 2005 }
2004 2006
2005 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { 2007 bool TabContents::GotResponseToLockMouseRequest(bool allowed) {
2006 return render_view_host() ? 2008 return render_view_host() ?
2007 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; 2009 render_view_host()->GotResponseToLockMouseRequest(allowed) : false;
2008 } 2010 }
2009
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698