OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // Only send the message if we aren't suspended at the start of a cross-site | 236 // Only send the message if we aren't suspended at the start of a cross-site |
237 // request. | 237 // request. |
238 if (navigations_suspended_) { | 238 if (navigations_suspended_) { |
239 // Shouldn't be possible to have a second navigation while suspended, since | 239 // Shouldn't be possible to have a second navigation while suspended, since |
240 // navigations will only be suspended during a cross-site request. If a | 240 // navigations will only be suspended during a cross-site request. If a |
241 // second navigation occurs, TabContents will cancel this pending RVH | 241 // second navigation occurs, TabContents will cancel this pending RVH |
242 // create a new pending RVH. | 242 // create a new pending RVH. |
243 DCHECK(!suspended_nav_message_.get()); | 243 DCHECK(!suspended_nav_message_.get()); |
244 suspended_nav_message_.reset(nav_message); | 244 suspended_nav_message_.reset(nav_message); |
245 } else { | 245 } else { |
| 246 // Unset this, otherwise if true and the hang monitor fires we'll |
| 247 // incorrectly close the tab. |
| 248 is_waiting_for_unload_ack_ = false; |
| 249 |
246 Send(nav_message); | 250 Send(nav_message); |
247 | 251 |
248 // Force the throbber to start. We do this because WebKit's "started | 252 // Force the throbber to start. We do this because WebKit's "started |
249 // loading" message will be received asynchronously from the UI of the | 253 // loading" message will be received asynchronously from the UI of the |
250 // browser. But we want to keep the throbber in sync with what's happening | 254 // browser. But we want to keep the throbber in sync with what's happening |
251 // in the UI. For example, we want to start throbbing immediately when the | 255 // in the UI. For example, we want to start throbbing immediately when the |
252 // user naivgates even if the renderer is delayed. There is also an issue | 256 // user naivgates even if the renderer is delayed. There is also an issue |
253 // with the throbber starting because the DOMUI (which controls whether the | 257 // with the throbber starting because the DOMUI (which controls whether the |
254 // favicon is displayed) happens synchronously. If the start loading | 258 // favicon is displayed) happens synchronously. If the start loading |
255 // messages was asynchronous, then the default favicon would flash in. | 259 // messages was asynchronous, then the default favicon would flash in. |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2041 RenderViewHostDelegate::ContentSettings* content_settings_delegate = | 2045 RenderViewHostDelegate::ContentSettings* content_settings_delegate = |
2042 delegate_->GetContentSettingsDelegate(); | 2046 delegate_->GetContentSettingsDelegate(); |
2043 if (content_settings_delegate) | 2047 if (content_settings_delegate) |
2044 content_settings_delegate->OnWebDatabaseAccessed( | 2048 content_settings_delegate->OnWebDatabaseAccessed( |
2045 url, name, display_name, estimated_size, blocked_by_policy); | 2049 url, name, display_name, estimated_size, blocked_by_policy); |
2046 } | 2050 } |
2047 | 2051 |
2048 void RenderViewHost::OnSetDisplayingPDFContent() { | 2052 void RenderViewHost::OnSetDisplayingPDFContent() { |
2049 delegate_->SetDisplayingPDFContent(); | 2053 delegate_->SetDisplayingPDFContent(); |
2050 } | 2054 } |
OLD | NEW |