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

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

Issue 468083003: Cleanup namespace usage in Source/web/Web[A-H]*.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing Created 6 years, 4 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 | « Source/web/WebDevToolsFrontendImpl.cpp ('k') | Source/web/WebDocumentType.cpp » ('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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "public/web/WebDOMEvent.h" 58 #include "public/web/WebDOMEvent.h"
59 #include "public/web/WebDocumentType.h" 59 #include "public/web/WebDocumentType.h"
60 #include "public/web/WebElement.h" 60 #include "public/web/WebElement.h"
61 #include "public/web/WebElementCollection.h" 61 #include "public/web/WebElementCollection.h"
62 #include "public/web/WebFormElement.h" 62 #include "public/web/WebFormElement.h"
63 #include "public/web/WebNodeList.h" 63 #include "public/web/WebNodeList.h"
64 #include "web/WebLocalFrameImpl.h" 64 #include "web/WebLocalFrameImpl.h"
65 #include "wtf/PassRefPtr.h" 65 #include "wtf/PassRefPtr.h"
66 #include <v8.h> 66 #include <v8.h>
67 67
68 using namespace blink;
69
70 namespace blink { 68 namespace blink {
71 69
72 WebURL WebDocument::url() const 70 WebURL WebDocument::url() const
73 { 71 {
74 return constUnwrap<Document>()->url(); 72 return constUnwrap<Document>()->url();
75 } 73 }
76 74
77 WebSecurityOrigin WebDocument::securityOrigin() const 75 WebSecurityOrigin WebDocument::securityOrigin() const
78 { 76 {
79 if (!constUnwrap<Document>()) 77 if (!constUnwrap<Document>())
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const 290 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const
293 { 291 {
294 WebVector<WebDraggableRegion> draggableRegions; 292 WebVector<WebDraggableRegion> draggableRegions;
295 const Document* document = constUnwrap<Document>(); 293 const Document* document = constUnwrap<Document>();
296 if (document->hasAnnotatedRegions()) { 294 if (document->hasAnnotatedRegions()) {
297 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions (); 295 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions ();
298 draggableRegions = WebVector<WebDraggableRegion>(regions.size()); 296 draggableRegions = WebVector<WebDraggableRegion>(regions.size());
299 for (size_t i = 0; i < regions.size(); i++) { 297 for (size_t i = 0; i < regions.size(); i++) {
300 const AnnotatedRegionValue& value = regions[i]; 298 const AnnotatedRegionValue& value = regions[i];
301 draggableRegions[i].draggable = value.draggable; 299 draggableRegions[i].draggable = value.draggable;
302 draggableRegions[i].bounds = blink::IntRect(value.bounds); 300 draggableRegions[i].bounds = IntRect(value.bounds);
303 } 301 }
304 } 302 }
305 return draggableRegions; 303 return draggableRegions;
306 } 304 }
307 305
308 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString & name, v8::Handle<v8::Value> options, WebExceptionCode& ec) 306 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString & name, v8::Handle<v8::Value> options, WebExceptionCode& ec)
309 { 307 {
310 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 308 v8::Isolate* isolate = v8::Isolate::GetCurrent();
311 Document* document = unwrap<Document>(); 309 Document* document = unwrap<Document>();
312 Dictionary dictionary(options, isolate); 310 Dictionary dictionary(options, isolate);
(...skipping 15 matching lines...) Expand all
328 m_private = elem; 326 m_private = elem;
329 return *this; 327 return *this;
330 } 328 }
331 329
332 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 330 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
333 { 331 {
334 return toDocument(m_private.get()); 332 return toDocument(m_private.get());
335 } 333 }
336 334
337 } // namespace blink 335 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebDevToolsFrontendImpl.cpp ('k') | Source/web/WebDocumentType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698