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

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

Issue 805773004: Create DOMWindowStorage as a DOMWindowLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename Created 6 years 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 | « Source/core/storage/DOMWindowStorageController.cpp ('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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/html/HTMLAppletElement.h" 43 #include "core/html/HTMLAppletElement.h"
44 #include "core/loader/DocumentLoader.h" 44 #include "core/loader/DocumentLoader.h"
45 #include "core/loader/FrameLoadRequest.h" 45 #include "core/loader/FrameLoadRequest.h"
46 #include "core/loader/FrameLoader.h" 46 #include "core/loader/FrameLoader.h"
47 #include "core/loader/HistoryItem.h" 47 #include "core/loader/HistoryItem.h"
48 #include "core/page/Chrome.h" 48 #include "core/page/Chrome.h"
49 #include "core/page/EventHandler.h" 49 #include "core/page/EventHandler.h"
50 #include "core/page/Page.h" 50 #include "core/page/Page.h"
51 #include "core/page/WindowFeatures.h" 51 #include "core/page/WindowFeatures.h"
52 #include "core/rendering/HitTestResult.h" 52 #include "core/rendering/HitTestResult.h"
53 #include "core/storage/DOMWindowStorageController.h"
53 #include "modules/device_light/DeviceLightController.h" 54 #include "modules/device_light/DeviceLightController.h"
54 #include "modules/device_orientation/DeviceMotionController.h" 55 #include "modules/device_orientation/DeviceMotionController.h"
55 #include "modules/device_orientation/DeviceOrientationController.h" 56 #include "modules/device_orientation/DeviceOrientationController.h"
56 #include "modules/gamepad/NavigatorGamepad.h" 57 #include "modules/gamepad/NavigatorGamepad.h"
57 #include "modules/serviceworkers/NavigatorServiceWorker.h" 58 #include "modules/serviceworkers/NavigatorServiceWorker.h"
58 #include "platform/MIMETypeRegistry.h" 59 #include "platform/MIMETypeRegistry.h"
59 #include "platform/RuntimeEnabledFeatures.h" 60 #include "platform/RuntimeEnabledFeatures.h"
60 #include "platform/UserGestureIndicator.h" 61 #include "platform/UserGestureIndicator.h"
61 #include "platform/exported/WrappedResourceRequest.h" 62 #include "platform/exported/WrappedResourceRequest.h"
62 #include "platform/exported/WrappedResourceResponse.h" 63 #include "platform/exported/WrappedResourceResponse.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 m_webFrame->client()->didClearWindowObject(m_webFrame); 122 m_webFrame->client()->didClearWindowObject(m_webFrame);
122 Document* document = m_webFrame->frame()->document(); 123 Document* document = m_webFrame->frame()->document();
123 if (document) { 124 if (document) {
124 DeviceMotionController::from(*document); 125 DeviceMotionController::from(*document);
125 DeviceOrientationController::from(*document); 126 DeviceOrientationController::from(*document);
126 if (RuntimeEnabledFeatures::deviceLightEnabled()) 127 if (RuntimeEnabledFeatures::deviceLightEnabled())
127 DeviceLightController::from(*document); 128 DeviceLightController::from(*document);
128 NavigatorGamepad::from(*document); 129 NavigatorGamepad::from(*document);
129 if (RuntimeEnabledFeatures::serviceWorkerEnabled()) 130 if (RuntimeEnabledFeatures::serviceWorkerEnabled())
130 NavigatorServiceWorker::from(*document); 131 NavigatorServiceWorker::from(*document);
132 DOMWindowStorageController::from(*document);
131 } 133 }
132 } 134 }
133 } 135 }
134 136
135 void FrameLoaderClientImpl::documentElementAvailable() 137 void FrameLoaderClientImpl::documentElementAvailable()
136 { 138 {
137 if (m_webFrame->client()) 139 if (m_webFrame->client())
138 m_webFrame->client()->didCreateDocumentElement(m_webFrame); 140 m_webFrame->client()->didCreateDocumentElement(m_webFrame);
139 } 141 }
140 142
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 926
925 unsigned FrameLoaderClientImpl::backForwardLength() 927 unsigned FrameLoaderClientImpl::backForwardLength()
926 { 928 {
927 WebViewImpl* webview = m_webFrame->viewImpl(); 929 WebViewImpl* webview = m_webFrame->viewImpl();
928 if (!webview || !webview->client()) 930 if (!webview || !webview->client())
929 return 0; 931 return 0;
930 return webview->client()->historyBackListCount() + 1 + webview->client()->hi storyForwardListCount(); 932 return webview->client()->historyBackListCount() + 1 + webview->client()->hi storyForwardListCount();
931 } 933 }
932 934
933 } // namespace blink 935 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/storage/DOMWindowStorageController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698