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

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

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 /* 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) 218 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
219 { 219 {
220 RefPtr<Document> document = unwrap<Document>(); 220 RefPtr<Document> document = unwrap<Document>();
221 Vector<String> selectors; 221 Vector<String> selectors;
222 selectors.append(webSelectors.data(), webSelectors.size()); 222 selectors.append(webSelectors.data(), webSelectors.size());
223 CSSSelectorWatch::from(*document).watchCSSSelectors(selectors); 223 CSSSelectorWatch::from(*document).watchCSSSelectors(selectors);
224 } 224 }
225 225
226 void WebDocument::cancelFullScreen() 226 void WebDocument::cancelFullScreen()
227 { 227 {
228 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(unwrap<Document>())) 228 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(*unwrap<Document>()))
229 fullscreen->webkitCancelFullScreen(); 229 fullscreen->webkitCancelFullScreen();
230 } 230 }
231 231
232 WebElement WebDocument::fullScreenElement() const 232 WebElement WebDocument::fullScreenElement() const
233 { 233 {
234 Element* fullScreenElement = 0; 234 Element* fullScreenElement = 0;
235 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(const_cast<WebDocument*>(this)->unwrap<Document>())) 235 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(*const_cast<WebDocument*>(this)->unwrap<Document>()))
236 fullScreenElement = fullscreen->webkitCurrentFullScreenElement(); 236 fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
237 return WebElement(fullScreenElement); 237 return WebElement(fullScreenElement);
238 } 238 }
239 239
240 WebDOMEvent WebDocument::createEvent(const WebString& eventType) 240 WebDOMEvent WebDocument::createEvent(const WebString& eventType)
241 { 241 {
242 TrackExceptionState exceptionState; 242 TrackExceptionState exceptionState;
243 WebDOMEvent event(unwrap<Document>()->createEvent(eventType, exceptionState) ); 243 WebDOMEvent event(unwrap<Document>()->createEvent(eventType, exceptionState) );
244 if (exceptionState.hadException()) 244 if (exceptionState.hadException())
245 return WebDOMEvent(); 245 return WebDOMEvent();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 m_private = elem; 310 m_private = elem;
311 return *this; 311 return *this;
312 } 312 }
313 313
314 WebDocument::operator PassRefPtr<Document>() const 314 WebDocument::operator PassRefPtr<Document>() const
315 { 315 {
316 return toDocument(m_private.get()); 316 return toDocument(m_private.get());
317 } 317 }
318 318
319 } // namespace blink 319 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698