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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 1197133004: Add support for snapshot loading to Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix mirror-system.sky Created 5 years, 6 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
« no previous file with comments | « sky/engine/public/sky/sky_view.cc ('k') | sky/tools/packager/loader.h » ('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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « sky/engine/public/sky/sky_view.cc ('k') | sky/tools/packager/loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698