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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/FileInputType.cpp

Issue 1373773003: Implement 'window.isSecureContext'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: document. Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 fileList->append(File::createForUserProvidedFile(files[i].path, file s[i].displayName)); 235 fileList->append(File::createForUserProvidedFile(files[i].path, file s[i].displayName));
236 } else { 236 } else {
237 fileList->append(File::createForFileSystemFile(files[i].fileSystemUR L, files[i].metadata, File::IsUserVisible)); 237 fileList->append(File::createForFileSystemFile(files[i].fileSystemUR L, files[i].metadata, File::IsUserVisible));
238 } 238 }
239 } 239 }
240 return fileList; 240 return fileList;
241 } 241 }
242 242
243 void FileInputType::countUsage() 243 void FileInputType::countUsage()
244 { 244 {
245 // It is required by isPrivilegedContext() but isn't 245 // It is required by isSecureContext() but isn't
246 // actually used. This could be used later if a warning is shown in the 246 // actually used. This could be used later if a warning is shown in the
247 // developer console. 247 // developer console.
248 String insecureOriginMsg; 248 String insecureOriginMsg;
249 Document* document = &element().document(); 249 Document* document = &element().document();
250 if (document->isPrivilegedContext(insecureOriginMsg)) 250 if (document->isSecureContext(insecureOriginMsg))
251 UseCounter::count(*document, UseCounter::InputTypeFileInsecureOrigin); 251 UseCounter::count(*document, UseCounter::InputTypeFileInsecureOrigin);
252 else 252 else
253 UseCounter::count(*document, UseCounter::InputTypeFileSecureOrigin); 253 UseCounter::count(*document, UseCounter::InputTypeFileSecureOrigin);
254 } 254 }
255 255
256 void FileInputType::createShadowSubtree() 256 void FileInputType::createShadowSubtree()
257 { 257 {
258 ASSERT(element().shadow()); 258 ASSERT(element().shadow());
259 RefPtrWillBeRawPtr<HTMLInputElement> button = HTMLInputElement::create(eleme nt().document(), 0, false); 259 RefPtrWillBeRawPtr<HTMLInputElement> button = HTMLInputElement::create(eleme nt().document(), 0, false);
260 button->setType(InputTypeNames::button); 260 button->setType(InputTypeNames::button);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 StringBuilder names; 376 StringBuilder names;
377 for (size_t i = 0; i < listSize; ++i) { 377 for (size_t i = 0; i < listSize; ++i) {
378 names.append(fileList->item(i)->name()); 378 names.append(fileList->item(i)->name());
379 if (i != listSize - 1) 379 if (i != listSize - 1)
380 names.append('\n'); 380 names.append('\n');
381 } 381 }
382 return names.toString(); 382 return names.toString();
383 } 383 }
384 384
385 } // namespace blink 385 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Window.idl ('k') | third_party/WebKit/Source/core/testing/NullExecutionContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698