| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 const TimeDelta kDelayForNavigationSync = TimeDelta::FromSeconds(5); | 93 const TimeDelta kDelayForNavigationSync = TimeDelta::FromSeconds(5); |
| 94 | 94 |
| 95 // The next available page ID to use. This ensures that the page IDs are | 95 // The next available page ID to use. This ensures that the page IDs are |
| 96 // globally unique in the renderer. | 96 // globally unique in the renderer. |
| 97 static int32 next_page_id_ = 1; | 97 static int32 next_page_id_ = 1; |
| 98 | 98 |
| 99 // The maximum number of popups that can be spawned from one page. | 99 // The maximum number of popups that can be spawned from one page. |
| 100 static const int kMaximumNumberOfUnacknowledgedPopups = 25; | 100 static const int kMaximumNumberOfUnacknowledgedPopups = 25; |
| 101 | 101 |
| 102 static const char* const kUnreachableWebDataURL = | 102 static const char* const kUnreachableWebDataURL = |
| 103 "chrome-resource://chromewebdata/"; | 103 "chrome://chromewebdata/"; |
| 104 | 104 |
| 105 static const char* const kBackForwardNavigationScheme = "history"; | 105 static const char* const kBackForwardNavigationScheme = "history"; |
| 106 | 106 |
| 107 namespace { | 107 namespace { |
| 108 | 108 |
| 109 // Associated with browser-initiated navigations to hold tracking data. | 109 // Associated with browser-initiated navigations to hold tracking data. |
| 110 class RenderViewExtraRequestData : public WebRequest::ExtraData { | 110 class RenderViewExtraRequestData : public WebRequest::ExtraData { |
| 111 public: | 111 public: |
| 112 RenderViewExtraRequestData(int32 pending_page_id, | 112 RenderViewExtraRequestData(int32 pending_page_id, |
| 113 PageTransition::Type transition, | 113 PageTransition::Type transition, |
| (...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2739 template_resource_id)); | 2739 template_resource_id)); |
| 2740 | 2740 |
| 2741 if (template_html.empty()) { | 2741 if (template_html.empty()) { |
| 2742 NOTREACHED() << "unable to load template. ID: " << template_resource_id; | 2742 NOTREACHED() << "unable to load template. ID: " << template_resource_id; |
| 2743 return ""; | 2743 return ""; |
| 2744 } | 2744 } |
| 2745 // "t" is the id of the templates root node. | 2745 // "t" is the id of the templates root node. |
| 2746 return jstemplate_builder::GetTemplateHtml( | 2746 return jstemplate_builder::GetTemplateHtml( |
| 2747 template_html, &error_strings, "t"); | 2747 template_html, &error_strings, "t"); |
| 2748 } | 2748 } |
| OLD | NEW |