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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 46094: Fix our handling of mixed SSL / non-SSL content.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache( 388 bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(
389 DocumentLoader* loader, 389 DocumentLoader* loader,
390 const ResourceRequest& request, 390 const ResourceRequest& request,
391 const ResourceResponse& response, 391 const ResourceResponse& response,
392 int length) { 392 int length) {
393 WebViewImpl* webview = webframe_->webview_impl(); 393 WebViewImpl* webview = webframe_->webview_impl();
394 WebViewDelegate* d = webview->delegate(); 394 WebViewDelegate* d = webview->delegate();
395 if (d) { 395 if (d) {
396 Frame* frame = webframe_->frame();
397 std::string frame_origin = webkit_glue::FrameToOrigin(frame);
398 std::string main_frame_origin =
399 webkit_glue::FrameToOrigin(frame ? frame->tree()->top() : NULL);
400
396 WebRequestImpl webreq(request); 401 WebRequestImpl webreq(request);
397 WebResponseImpl webresp(response); 402 WebResponseImpl webresp(response);
398 return d->DidLoadResourceFromMemoryCache(webview, webreq, webresp, 403 return d->DidLoadResourceFromMemoryCache(webview, webreq, webresp,
399 webframe_); 404 webframe_, frame_origin,
405 main_frame_origin);
400 } 406 }
401 407
402 return false; 408 return false;
403 } 409 }
404 410
405 void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() { 411 void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() {
406 // During the onload event of a subframe, the subframe can be removed. In 412 // During the onload event of a subframe, the subframe can be removed. In
407 // that case, it has no page. This is covered by 413 // that case, it has no page. This is covered by
408 // LayoutTests/fast/dom/replaceChild.html 414 // LayoutTests/fast/dom/replaceChild.html
409 if (!webframe_->frame()->page()) 415 if (!webframe_->frame()->page())
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 if (!middle_or_ctrl && !shift && !alt) 1519 if (!middle_or_ctrl && !shift && !alt)
1514 return false; 1520 return false;
1515 1521
1516 DCHECK(disposition); 1522 DCHECK(disposition);
1517 if (middle_or_ctrl) 1523 if (middle_or_ctrl)
1518 *disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 1524 *disposition = shift ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
1519 else 1525 else
1520 *disposition = shift ? NEW_WINDOW : SAVE_TO_DISK; 1526 *disposition = shift ? NEW_WINDOW : SAVE_TO_DISK;
1521 return true; 1527 return true;
1522 } 1528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698