Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 977 message_loop()->AddTaskObserver(memory_observer_.get()); | 977 message_loop()->AddTaskObserver(memory_observer_.get()); |
| 978 } | 978 } |
| 979 } | 979 } |
| 980 | 980 |
| 981 void RenderThreadImpl::RegisterSchemes() { | 981 void RenderThreadImpl::RegisterSchemes() { |
| 982 // swappedout: pages should not be accessible, and should also | 982 // swappedout: pages should not be accessible, and should also |
| 983 // be treated as empty documents that can commit synchronously. | 983 // be treated as empty documents that can commit synchronously. |
| 984 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); | 984 WebString swappedout_scheme(base::ASCIIToUTF16(kSwappedOutScheme)); |
| 985 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); | 985 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(swappedout_scheme); |
| 986 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); | 986 WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); |
| 987 | |
| 988 // This scheme serves resources that may be injected into the | |
| 989 // web page (e.g. by Blink). This isn't mixed content, and | |
| 990 // content security policy doesn't apply. | |
| 991 WebString resource_scheme(base::ASCIIToUTF16(kResourceScheme)); | |
| 992 WebSecurityPolicy::registerURLSchemeAsSecure(resource_scheme); | |
| 993 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( | |
| 994 resource_scheme); | |
|
Tom Sepez
2014/11/18 20:47:17
I thought I'd see one of your newfangled constants
| |
| 987 } | 995 } |
| 988 | 996 |
| 989 void RenderThreadImpl::NotifyTimezoneChange() { | 997 void RenderThreadImpl::NotifyTimezoneChange() { |
| 990 NotifyTimezoneChangeOnThisThread(); | 998 NotifyTimezoneChangeOnThisThread(); |
| 991 RenderThread::Get()->PostTaskToAllWebWorkers( | 999 RenderThread::Get()->PostTaskToAllWebWorkers( |
| 992 base::Bind(&NotifyTimezoneChangeOnThisThread)); | 1000 base::Bind(&NotifyTimezoneChangeOnThisThread)); |
| 993 } | 1001 } |
| 994 | 1002 |
| 995 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { | 1003 void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { |
| 996 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); | 1004 Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1626 hidden_widget_count_--; | 1634 hidden_widget_count_--; |
| 1627 | 1635 |
| 1628 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1636 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1629 return; | 1637 return; |
| 1630 } | 1638 } |
| 1631 | 1639 |
| 1632 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1640 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1633 } | 1641 } |
| 1634 | 1642 |
| 1635 } // namespace content | 1643 } // namespace content |
| OLD | NEW |