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

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

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPluginContainerImpl.cpp ('k') | Source/web/tests/ChromeClientImplTest.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) 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 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 1587
1588 Frame* WebViewImpl::focusedWebCoreFrame() const 1588 Frame* WebViewImpl::focusedWebCoreFrame() const
1589 { 1589 {
1590 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; 1590 return m_page ? m_page->focusController().focusedOrMainFrame() : 0;
1591 } 1591 }
1592 1592
1593 WebViewImpl* WebViewImpl::fromPage(Page* page) 1593 WebViewImpl* WebViewImpl::fromPage(Page* page)
1594 { 1594 {
1595 if (!page) 1595 if (!page)
1596 return 0; 1596 return 0;
1597 1597 return static_cast<WebViewImpl*>(page->chrome().client().webView());
1598 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(page->chrome ().client());
1599 return static_cast<WebViewImpl*>(chromeClient->webView());
1600 } 1598 }
1601 1599
1602 // WebWidget ------------------------------------------------------------------ 1600 // WebWidget ------------------------------------------------------------------
1603 1601
1604 void WebViewImpl::close() 1602 void WebViewImpl::close()
1605 { 1603 {
1606 if (m_page) { 1604 if (m_page) {
1607 // Initiate shutdown for the entire frameset. This will cause a lot of 1605 // Initiate shutdown for the entire frameset. This will cause a lot of
1608 // notifications to be sent. 1606 // notifications to be sent.
1609 if (m_page->mainFrame()) 1607 if (m_page->mainFrame())
(...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after
4108 } 4106 }
4109 4107
4110 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4108 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4111 { 4109 {
4112 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4110 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4113 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4111 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4114 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4112 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4115 } 4113 }
4116 4114
4117 } // namespace WebKit 4115 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebPluginContainerImpl.cpp ('k') | Source/web/tests/ChromeClientImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698