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

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

Issue 211013: Introduce WebKit::WebSecurityOrigin as a wrapper around... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 #include "skia/ext/bitmap_platform_device.h" 145 #include "skia/ext/bitmap_platform_device.h"
146 #include "skia/ext/platform_canvas.h" 146 #include "skia/ext/platform_canvas.h"
147 #include "webkit/api/public/WebConsoleMessage.h" 147 #include "webkit/api/public/WebConsoleMessage.h"
148 #include "webkit/api/public/WebFindOptions.h" 148 #include "webkit/api/public/WebFindOptions.h"
149 #include "webkit/api/public/WebForm.h" 149 #include "webkit/api/public/WebForm.h"
150 #include "webkit/api/public/WebFrameClient.h" 150 #include "webkit/api/public/WebFrameClient.h"
151 #include "webkit/api/public/WebHistoryItem.h" 151 #include "webkit/api/public/WebHistoryItem.h"
152 #include "webkit/api/public/WebRange.h" 152 #include "webkit/api/public/WebRange.h"
153 #include "webkit/api/public/WebRect.h" 153 #include "webkit/api/public/WebRect.h"
154 #include "webkit/api/public/WebScriptSource.h" 154 #include "webkit/api/public/WebScriptSource.h"
155 #include "webkit/api/public/WebSecurityOrigin.h"
155 #include "webkit/api/public/WebSize.h" 156 #include "webkit/api/public/WebSize.h"
156 #include "webkit/api/public/WebURLError.h" 157 #include "webkit/api/public/WebURLError.h"
157 #include "webkit/api/public/WebVector.h" 158 #include "webkit/api/public/WebVector.h"
158 #include "webkit/api/src/WebDataSourceImpl.h" 159 #include "webkit/api/src/WebDataSourceImpl.h"
159 #include "webkit/glue/chrome_client_impl.h" 160 #include "webkit/glue/chrome_client_impl.h"
160 #include "webkit/glue/dom_operations.h" 161 #include "webkit/glue/dom_operations.h"
161 #include "webkit/glue/dom_operations_private.h" 162 #include "webkit/glue/dom_operations_private.h"
162 #include "webkit/glue/glue_util.h" 163 #include "webkit/glue/glue_util.h"
163 #include "webkit/glue/webframe_impl.h" 164 #include "webkit/glue/webframe_impl.h"
164 #include "webkit/glue/webview_impl.h" 165 #include "webkit/glue/webview_impl.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 using WebKit::WebDataSource; 218 using WebKit::WebDataSource;
218 using WebKit::WebDataSourceImpl; 219 using WebKit::WebDataSourceImpl;
219 using WebKit::WebFindOptions; 220 using WebKit::WebFindOptions;
220 using WebKit::WebFrame; 221 using WebKit::WebFrame;
221 using WebKit::WebFrameClient; 222 using WebKit::WebFrameClient;
222 using WebKit::WebHistoryItem; 223 using WebKit::WebHistoryItem;
223 using WebKit::WebForm; 224 using WebKit::WebForm;
224 using WebKit::WebRange; 225 using WebKit::WebRange;
225 using WebKit::WebRect; 226 using WebKit::WebRect;
226 using WebKit::WebScriptSource; 227 using WebKit::WebScriptSource;
228 using WebKit::WebSecurityOrigin;
227 using WebKit::WebSize; 229 using WebKit::WebSize;
228 using WebKit::WebString; 230 using WebKit::WebString;
229 using WebKit::WebURL; 231 using WebKit::WebURL;
230 using WebKit::WebURLError; 232 using WebKit::WebURLError;
231 using WebKit::WebURLRequest; 233 using WebKit::WebURLRequest;
232 using WebKit::WebURLResponse; 234 using WebKit::WebURLResponse;
233 using WebKit::WebVector; 235 using WebKit::WebVector;
234 236
235 // Key for a StatsCounter tracking how many WebFrames are active. 237 // Key for a StatsCounter tracking how many WebFrames are active.
236 static const char* const kWebFrameActiveCount = "WebFrameActiveCount"; 238 static const char* const kWebFrameActiveCount = "WebFrameActiveCount";
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 Node* node = forms->item(i); 559 Node* node = forms->item(i);
558 // Strange but true, sometimes item can be NULL. 560 // Strange but true, sometimes item can be NULL.
559 if (node) { 561 if (node) {
560 temp[i] = webkit_glue::HTMLFormElementToWebForm( 562 temp[i] = webkit_glue::HTMLFormElementToWebForm(
561 static_cast<HTMLFormElement*>(node)); 563 static_cast<HTMLFormElement*>(node));
562 } 564 }
563 } 565 }
564 results.swap(temp); 566 results.swap(temp);
565 } 567 }
566 568
567 WebString WebFrameImpl::securityOrigin() const { 569 WebSecurityOrigin WebFrameImpl::securityOrigin() const {
568 if (frame_) { 570 if (!frame_ || !frame_->document())
569 if (frame_->document()) 571 return WebSecurityOrigin();
570 return webkit_glue::StringToWebString( 572
571 frame_->document()->securityOrigin()->toString()); 573 return webkit_glue::SecurityOriginToWebSecurityOrigin(
572 } 574 frame_->document()->securityOrigin());
573 return WebString::fromUTF8("null");
574 } 575 }
575 576
576 void WebFrameImpl::grantUniversalAccess() { 577 void WebFrameImpl::grantUniversalAccess() {
577 DCHECK(frame_ && frame_->document()); 578 DCHECK(frame_ && frame_->document());
578 if (frame_ && frame_->document()) { 579 if (frame_ && frame_->document()) {
579 frame_->document()->securityOrigin()->grantUniversalAccess(); 580 frame_->document()->securityOrigin()->grantUniversalAccess();
580 } 581 }
581 } 582 }
582 583
583 NPObject* WebFrameImpl::windowObject() const { 584 NPObject* WebFrameImpl::windowObject() const {
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 1899
1899 SecurityOrigin* security_origin = frame_->document()->securityOrigin(); 1900 SecurityOrigin* security_origin = frame_->document()->securityOrigin();
1900 1901
1901 if (!frame_->loader()->isScheduledLocationChangePending()) { 1902 if (!frame_->loader()->isScheduledLocationChangePending()) {
1902 frame_->loader()->stopAllLoaders(); 1903 frame_->loader()->stopAllLoaders();
1903 frame_->loader()->begin(frame_->loader()->url(), true, security_origin); 1904 frame_->loader()->begin(frame_->loader()->url(), true, security_origin);
1904 frame_->loader()->write(script_result); 1905 frame_->loader()->write(script_result);
1905 frame_->loader()->end(); 1906 frame_->loader()->end();
1906 } 1907 }
1907 } 1908 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698