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

Side by Side Diff: Source/web/WebDocument.cpp

Issue 1136883003: Expose Document::isPrivilegedContext from WebDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | public/web/WebDocument.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return constUnwrap<Document>()->url(); 75 return constUnwrap<Document>()->url();
76 } 76 }
77 77
78 WebSecurityOrigin WebDocument::securityOrigin() const 78 WebSecurityOrigin WebDocument::securityOrigin() const
79 { 79 {
80 if (!constUnwrap<Document>()) 80 if (!constUnwrap<Document>())
81 return WebSecurityOrigin(); 81 return WebSecurityOrigin();
82 return WebSecurityOrigin(constUnwrap<Document>()->securityOrigin()); 82 return WebSecurityOrigin(constUnwrap<Document>()->securityOrigin());
83 } 83 }
84 84
85 bool WebDocument::isPrivilegedContext(WebString& errorMessage)
86 {
87 Document* document = unwrap<Document>();
jww 2015/05/12 02:35:20 I *think* isPrivilegedContext() actually could be
88 if (!document)
89 return false;
90 String message;
91 bool result = document->isPrivilegedContext(message);
92 errorMessage = message;
93 return result;
94 }
95
85 WebString WebDocument::encoding() const 96 WebString WebDocument::encoding() const
86 { 97 {
87 return constUnwrap<Document>()->encodingName(); 98 return constUnwrap<Document>()->encodingName();
88 } 99 }
89 100
90 WebString WebDocument::contentLanguage() const 101 WebString WebDocument::contentLanguage() const
91 { 102 {
92 return constUnwrap<Document>()->contentLanguage(); 103 return constUnwrap<Document>()->contentLanguage();
93 } 104 }
94 105
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 m_private = elem; 404 m_private = elem;
394 return *this; 405 return *this;
395 } 406 }
396 407
397 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 408 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
398 { 409 {
399 return toDocument(m_private.get()); 410 return toDocument(m_private.get());
400 } 411 }
401 412
402 } // namespace blink 413 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698