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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 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) 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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 Frame* WebViewImpl::focusedWebCoreFrame() const 1547 Frame* WebViewImpl::focusedWebCoreFrame() const
1548 { 1548 {
1549 return m_page ? m_page->focusController()->focusedOrMainFrame() : 0; 1549 return m_page ? m_page->focusController()->focusedOrMainFrame() : 0;
1550 } 1550 }
1551 1551
1552 WebViewImpl* WebViewImpl::fromPage(Page* page) 1552 WebViewImpl* WebViewImpl::fromPage(Page* page)
1553 { 1553 {
1554 if (!page) 1554 if (!page)
1555 return 0; 1555 return 0;
1556 1556
1557 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(page->chrome ()->client()); 1557 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(page->chrome ().client());
1558 return static_cast<WebViewImpl*>(chromeClient->webView()); 1558 return static_cast<WebViewImpl*>(chromeClient->webView());
1559 } 1559 }
1560 1560
1561 // WebWidget ------------------------------------------------------------------ 1561 // WebWidget ------------------------------------------------------------------
1562 1562
1563 void WebViewImpl::close() 1563 void WebViewImpl::close()
1564 { 1564 {
1565 if (m_page) { 1565 if (m_page) {
1566 // Initiate shutdown for the entire frameset. This will cause a lot of 1566 // Initiate shutdown for the entire frameset. This will cause a lot of
1567 // notifications to be sent. 1567 // notifications to be sent.
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after
4150 } 4150 }
4151 4151
4152 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4152 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4153 { 4153 {
4154 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4154 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4155 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4155 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4156 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4156 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4157 } 4157 }
4158 4158
4159 } // namespace WebKit 4159 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebPluginContainerImpl.cpp ('k') | Source/WebKit/chromium/tests/ChromeClientImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698