| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/manifest/manifest_manager.h" | 5 #include "content/renderer/manifest/manifest_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/nullable_string16.h" | 8 #include "base/strings/nullable_string16.h" |
| 9 #include "content/common/manifest_manager_messages.h" | 9 #include "content/common/manifest_manager_messages.h" |
| 10 #include "content/public/renderer/render_frame.h" | 10 #include "content/public/renderer/render_frame.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 void ManifestManager::DidChangeManifest() { | 102 void ManifestManager::DidChangeManifest() { |
| 103 may_have_manifest_ = true; | 103 may_have_manifest_ = true; |
| 104 manifest_dirty_ = true; | 104 manifest_dirty_ = true; |
| 105 manifest_url_ = GURL(); | 105 manifest_url_ = GURL(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void ManifestManager::DidCommitProvisionalLoad( | 108 void ManifestManager::DidCommitProvisionalLoad( |
| 109 bool is_new_navigation, | 109 bool is_new_navigation, |
| 110 bool is_same_page_navigation) { | 110 bool is_same_document_navigation) { |
| 111 if (is_same_page_navigation) | 111 if (is_same_document_navigation) |
| 112 return; | 112 return; |
| 113 | 113 |
| 114 may_have_manifest_ = false; | 114 may_have_manifest_ = false; |
| 115 manifest_dirty_ = true; | 115 manifest_dirty_ = true; |
| 116 manifest_url_ = GURL(); | 116 manifest_url_ = GURL(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void ManifestManager::FetchManifest() { | 119 void ManifestManager::FetchManifest() { |
| 120 manifest_url_ = render_frame()->GetWebFrame()->document().manifestURL(); | 120 manifest_url_ = render_frame()->GetWebFrame()->document().manifestURL(); |
| 121 | 121 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 it != callbacks.end(); ++it) { | 203 it != callbacks.end(); ++it) { |
| 204 it->Run(manifest_url_, manifest_, manifest_debug_info_); | 204 it->Run(manifest_url_, manifest_, manifest_debug_info_); |
| 205 } | 205 } |
| 206 } | 206 } |
| 207 | 207 |
| 208 void ManifestManager::OnDestruct() { | 208 void ManifestManager::OnDestruct() { |
| 209 delete this; | 209 delete this; |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace content | 212 } // namespace content |
| OLD | NEW |