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

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 cache->childrenChanged(&m_popupClient->ownerElement()); 320 cache->childrenChanged(&m_popupClient->ownerElement());
321 321
322 DCHECK(frame->domWindow()); 322 DCHECK(frame->domWindow());
323 PagePopupSupplement::install(*frame, *this, m_popupClient); 323 PagePopupSupplement::install(*frame, *this, m_popupClient);
324 DCHECK_EQ(m_popupClient->ownerElement().document().existingAXObjectCache(), 324 DCHECK_EQ(m_popupClient->ownerElement().document().existingAXObjectCache(),
325 frame->document()->existingAXObjectCache()); 325 frame->document()->existingAXObjectCache());
326 326
327 RefPtr<SharedBuffer> data = SharedBuffer::create(); 327 RefPtr<SharedBuffer> data = SharedBuffer::create();
328 m_popupClient->writeDocument(data.get()); 328 m_popupClient->writeDocument(data.get());
329 frame->setPageZoomFactor(m_popupClient->zoomFactor()); 329 frame->setPageZoomFactor(m_popupClient->zoomFactor());
330 frame->loader().load(FrameLoadRequest( 330 frame->loader().load(
331 0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), 331 FrameLoadRequest(0, blankURL(),
332 ForceSynchronousLoad))); 332 SubstituteData(data, "text/html", "UTF-8", KURL(),
333 ForceSynchronousLoad)));
333 return true; 334 return true;
334 } 335 }
335 336
336 void WebPagePopupImpl::postMessage(const String& message) { 337 void WebPagePopupImpl::postMessage(const String& message) {
337 if (!m_page) 338 if (!m_page)
338 return; 339 return;
339 ScriptForbiddenScope::AllowUserAgentScript allowScript; 340 ScriptForbiddenScope::AllowUserAgentScript allowScript;
340 if (LocalDOMWindow* window = toLocalFrame(m_page->mainFrame())->domWindow()) 341 if (LocalDOMWindow* window = toLocalFrame(m_page->mainFrame())->domWindow())
341 window->dispatchEvent(MessageEvent::create(message)); 342 window->dispatchEvent(MessageEvent::create(message));
342 } 343 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 // A WebPagePopupImpl instance usually has two references. 601 // A WebPagePopupImpl instance usually has two references.
601 // - One owned by the instance itself. It represents the visible widget. 602 // - One owned by the instance itself. It represents the visible widget.
602 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 603 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
603 // WebPagePopupImpl to close. 604 // WebPagePopupImpl to close.
604 // We need them because the closing operation is asynchronous and the widget 605 // We need them because the closing operation is asynchronous and the widget
605 // can be closed while the WebViewImpl is unaware of it. 606 // can be closed while the WebViewImpl is unaware of it.
606 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 607 return adoptRef(new WebPagePopupImpl(client)).leakRef();
607 } 608 }
608 609
609 } // namespace blink 610 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698