OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 if (name == GetFrame()->Tree().GetName()) | 1116 if (name == GetFrame()->Tree().GetName()) |
1117 return; | 1117 return; |
1118 | 1118 |
1119 GetFrame()->Tree().SetName(name); | 1119 GetFrame()->Tree().SetName(name); |
1120 DCHECK(GetFrame()->Loader().Client()); | 1120 DCHECK(GetFrame()->Loader().Client()); |
1121 GetFrame()->Loader().Client()->DidChangeName(name); | 1121 GetFrame()->Loader().Client()->DidChangeName(name); |
1122 } | 1122 } |
1123 | 1123 |
1124 void LocalDOMWindow::setStatus(const String& string) { | 1124 void LocalDOMWindow::setStatus(const String& string) { |
1125 status_ = string; | 1125 status_ = string; |
1126 | |
1127 if (!GetFrame()) | |
1128 return; | |
1129 | |
1130 Page* page = GetFrame()->GetPage(); | |
1131 if (!page) | |
1132 return; | |
1133 | |
1134 page->GetChromeClient().SetStatusbarText(status_); | |
1135 } | 1126 } |
1136 | 1127 |
1137 void LocalDOMWindow::setDefaultStatus(const String& string) { | 1128 void LocalDOMWindow::setDefaultStatus(const String& string) { |
1138 default_status_ = string; | 1129 default_status_ = string; |
1139 | |
1140 if (!GetFrame()) | |
1141 return; | |
1142 | |
1143 Page* page = GetFrame()->GetPage(); | |
1144 if (!page) | |
1145 return; | |
1146 | |
1147 page->GetChromeClient().SetStatusbarText(default_status_); | |
1148 } | 1130 } |
1149 | 1131 |
1150 String LocalDOMWindow::origin() const { | 1132 String LocalDOMWindow::origin() const { |
1151 return GetExecutionContext()->GetSecurityOrigin()->ToString(); | 1133 return GetExecutionContext()->GetSecurityOrigin()->ToString(); |
1152 } | 1134 } |
1153 | 1135 |
1154 Document* LocalDOMWindow::document() const { | 1136 Document* LocalDOMWindow::document() const { |
1155 return document_.Get(); | 1137 return document_.Get(); |
1156 } | 1138 } |
1157 | 1139 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 DOMWindow::Trace(visitor); | 1667 DOMWindow::Trace(visitor); |
1686 Supplementable<LocalDOMWindow>::Trace(visitor); | 1668 Supplementable<LocalDOMWindow>::Trace(visitor); |
1687 } | 1669 } |
1688 | 1670 |
1689 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1671 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
1690 visitor->TraceWrappers(custom_elements_); | 1672 visitor->TraceWrappers(custom_elements_); |
1691 DOMWindow::TraceWrappers(visitor); | 1673 DOMWindow::TraceWrappers(visitor); |
1692 } | 1674 } |
1693 | 1675 |
1694 } // namespace blink | 1676 } // namespace blink |
OLD | NEW |