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

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

Issue 1021083003: [DevTools] Pause input events in WebFrameWidgetImpl while debugging. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: typo Created 5 years, 9 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 { 371 {
372 ASSERT(m_page); 372 ASSERT(m_page);
373 providePrerendererClientTo(*m_page, new PrerendererClientImpl(prerendererCli ent)); 373 providePrerendererClientTo(*m_page, new PrerendererClientImpl(prerendererCli ent));
374 } 374 }
375 375
376 void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient) 376 void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient)
377 { 377 {
378 m_spellCheckClient = spellCheckClient; 378 m_spellCheckClient = spellCheckClient;
379 } 379 }
380 380
381 // static
382 HashSet<WebViewImpl*>& WebViewImpl::allInstances()
383 {
384 DEFINE_STATIC_LOCAL(HashSet<WebViewImpl*>, allInstances, ());
385 return allInstances;
386 }
387
381 WebViewImpl::WebViewImpl(WebViewClient* client) 388 WebViewImpl::WebViewImpl(WebViewClient* client)
382 : m_client(client) 389 : m_client(client)
383 , m_spellCheckClient(0) 390 , m_spellCheckClient(0)
384 , m_chromeClientImpl(this) 391 , m_chromeClientImpl(this)
385 , m_contextMenuClientImpl(this) 392 , m_contextMenuClientImpl(this)
386 , m_dragClientImpl(this) 393 , m_dragClientImpl(this)
387 , m_editorClientImpl(this) 394 , m_editorClientImpl(this)
388 , m_spellCheckerClientImpl(this) 395 , m_spellCheckerClientImpl(this)
389 , m_storageClientImpl(this) 396 , m_storageClientImpl(this)
390 , m_shouldAutoResize(false) 397 , m_shouldAutoResize(false)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 m_page->makeOrdinary(); 462 m_page->makeOrdinary();
456 463
457 if (m_client) { 464 if (m_client) {
458 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor); 465 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor);
459 setVisibilityState(m_client->visibilityState(), true); 466 setVisibilityState(m_client->visibilityState(), true);
460 } 467 }
461 468
462 initializeLayerTreeView(); 469 initializeLayerTreeView();
463 470
464 m_devToolsEmulator = adoptPtr(new DevToolsEmulator(this)); 471 m_devToolsEmulator = adoptPtr(new DevToolsEmulator(this));
472
473 allInstances().add(this);
465 } 474 }
466 475
467 WebViewImpl::~WebViewImpl() 476 WebViewImpl::~WebViewImpl()
468 { 477 {
469 ASSERT(!m_page); 478 ASSERT(!m_page);
470 } 479 }
471 480
472 WebLocalFrameImpl* WebViewImpl::mainFrameImpl() 481 WebLocalFrameImpl* WebViewImpl::mainFrameImpl()
473 { 482 {
474 return m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame() ? WebLocalFrameImpl::fromFrame(m_page->deprecatedLocalMainFrame()) : 0; 483 return m_page && m_page->mainFrame() && m_page->mainFrame()->isLocalFrame() ? WebLocalFrameImpl::fromFrame(m_page->deprecatedLocalMainFrame()) : 0;
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 } 1687 }
1679 1688
1680 // WebWidget ------------------------------------------------------------------ 1689 // WebWidget ------------------------------------------------------------------
1681 1690
1682 void WebViewImpl::close() 1691 void WebViewImpl::close()
1683 { 1692 {
1684 // Should happen before m_page.clear(). 1693 // Should happen before m_page.clear().
1685 if (m_devToolsAgent) 1694 if (m_devToolsAgent)
1686 m_devToolsAgent->willBeDestroyed(); 1695 m_devToolsAgent->willBeDestroyed();
1687 1696
1697 WebDevToolsAgentImpl::webViewImplClosed(this);
1698 ASSERT(allInstances().contains(this));
1699 allInstances().remove(this);
1700
1688 if (m_page) { 1701 if (m_page) {
1689 // Initiate shutdown for the entire frameset. This will cause a lot of 1702 // Initiate shutdown for the entire frameset. This will cause a lot of
1690 // notifications to be sent. 1703 // notifications to be sent.
1691 m_page->willBeDestroyed(); 1704 m_page->willBeDestroyed();
1692 m_page.clear(); 1705 m_page.clear();
1693 } 1706 }
1694 1707
1695 // Should happen after m_page.clear(). 1708 // Should happen after m_page.clear().
1696 if (m_devToolsAgent) { 1709 if (m_devToolsAgent) {
1697 m_devToolsAgent->dispose(); 1710 m_devToolsAgent->dispose();
(...skipping 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after
4691 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4704 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4692 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4705 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4693 } 4706 }
4694 4707
4695 void WebViewImpl::forceNextWebGLContextCreationToFail() 4708 void WebViewImpl::forceNextWebGLContextCreationToFail()
4696 { 4709 {
4697 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4710 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4698 } 4711 }
4699 4712
4700 } // namespace blink 4713 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698