OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_view.h" | 5 #include "content/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // current content state during tab closing we use a shorter timeout for the | 254 // current content state during tab closing we use a shorter timeout for the |
255 // foreground renderer. This means there is a small window of time from which | 255 // foreground renderer. This means there is a small window of time from which |
256 // content state is modified and not sent to session restore, but this is | 256 // content state is modified and not sent to session restore, but this is |
257 // better than having to wake up all renderers during shutdown. | 257 // better than having to wake up all renderers during shutdown. |
258 static const int kDelaySecondsForContentStateSyncHidden = 5; | 258 static const int kDelaySecondsForContentStateSyncHidden = 5; |
259 static const int kDelaySecondsForContentStateSync = 1; | 259 static const int kDelaySecondsForContentStateSync = 1; |
260 | 260 |
261 // The maximum number of popups that can be spawned from one page. | 261 // The maximum number of popups that can be spawned from one page. |
262 static const int kMaximumNumberOfUnacknowledgedPopups = 25; | 262 static const int kMaximumNumberOfUnacknowledgedPopups = 25; |
263 | 263 |
264 static const char kBackForwardNavigationScheme[] = "history"; | |
265 | |
266 static void GetRedirectChain(WebDataSource* ds, std::vector<GURL>* result) { | 264 static void GetRedirectChain(WebDataSource* ds, std::vector<GURL>* result) { |
267 WebVector<WebURL> urls; | 265 WebVector<WebURL> urls; |
268 ds->redirectChain(urls); | 266 ds->redirectChain(urls); |
269 result->reserve(urls.size()); | 267 result->reserve(urls.size()); |
270 for (size_t i = 0; i < urls.size(); ++i) | 268 for (size_t i = 0; i < urls.size(); ++i) |
271 result->push_back(urls[i]); | 269 result->push_back(urls[i]); |
272 } | 270 } |
273 | 271 |
274 static bool WebAccessibilityNotificationToViewHostMsg( | 272 static bool WebAccessibilityNotificationToViewHostMsg( |
275 WebAccessibilityNotification notification, | 273 WebAccessibilityNotification notification, |
(...skipping 4271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4547 } | 4545 } |
4548 #endif | 4546 #endif |
4549 | 4547 |
4550 void RenderView::OnContextMenuClosed( | 4548 void RenderView::OnContextMenuClosed( |
4551 const webkit_glue::CustomContextMenuContext& custom_context) { | 4549 const webkit_glue::CustomContextMenuContext& custom_context) { |
4552 if (custom_context.is_pepper_menu) | 4550 if (custom_context.is_pepper_menu) |
4553 pepper_delegate_.OnContextMenuClosed(custom_context); | 4551 pepper_delegate_.OnContextMenuClosed(custom_context); |
4554 else | 4552 else |
4555 context_menu_node_.reset(); | 4553 context_menu_node_.reset(); |
4556 } | 4554 } |
OLD | NEW |