| OLD | NEW |
| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 { | 97 { |
| 98 std::string filename = url.ExtractFileName(); | 98 std::string filename = url.ExtractFileName(); |
| 99 int hashStart = filename.find('#'); | 99 int hashStart = filename.find('#'); |
| 100 if (hashStart != -1) | 100 if (hashStart != -1) |
| 101 filename.resize(hashStart); | 101 filename.resize(hashStart); |
| 102 int queryStart = filename.find('?'); | 102 int queryStart = filename.find('?'); |
| 103 if (queryStart != -1) | 103 if (queryStart != -1) |
| 104 filename.resize(queryStart); | 104 filename.resize(queryStart); |
| 105 // For now .dart indicates we should use SkyView. Eventually we'll | 105 // For now .dart indicates we should use SkyView. Eventually we'll |
| 106 // use SkyView for all urls regardless of file extension. | 106 // use SkyView for all urls regardless of file extension. |
| 107 return !EndsWith(filename, ".dart", false); | 107 return !EndsWith(filename, ".dart", false) |
| 108 && !EndsWith(filename, ".snapshot", false); |
| 108 } | 109 } |
| 109 | 110 |
| 110 WebView* WebView::create(WebViewClient* client) | 111 WebView* WebView::create(WebViewClient* client) |
| 111 { | 112 { |
| 112 // Pass the WebViewImpl's self-reference to the caller. | 113 // Pass the WebViewImpl's self-reference to the caller. |
| 113 return WebViewImpl::create(client); | 114 return WebViewImpl::create(client); |
| 114 } | 115 } |
| 115 | 116 |
| 116 WebViewImpl* WebViewImpl::create(WebViewClient* client) | 117 WebViewImpl* WebViewImpl::create(WebViewClient* client) |
| 117 { | 118 { |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 821 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
| 821 bool isInitialState) { | 822 bool isInitialState) { |
| 822 if (!page()) | 823 if (!page()) |
| 823 return; | 824 return; |
| 824 | 825 |
| 825 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); | 826 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); |
| 826 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 827 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
| 827 } | 828 } |
| 828 | 829 |
| 829 } // namespace blink | 830 } // namespace blink |
| OLD | NEW |