Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 2378393002: Pass the user_gesture context in the IPC message FrameMsg_CommitNavigation to the renderer. (Closed)
Patch Set: Address review comments. Define the has_user_gesture flag in the RequestNavigationParams structure. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/navigation_entry_impl.h" 5 #include "content/browser/frame_host/navigation_entry_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 current_offset_to_send = -1; 715 current_offset_to_send = -1;
716 current_length_to_send = 0; 716 current_length_to_send = 0;
717 } 717 }
718 718
719 RequestNavigationParams request_params( 719 RequestNavigationParams request_params(
720 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), 720 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(),
721 base::Time::Now(), frame_entry.page_state(), GetPageID(), GetUniqueID(), 721 base::Time::Now(), frame_entry.page_state(), GetPageID(), GetUniqueID(),
722 is_same_document_history_load, is_history_navigation_in_new_child, 722 is_same_document_history_load, is_history_navigation_in_new_child,
723 has_subtree_history_items, has_committed_real_load, intended_as_new_entry, 723 has_subtree_history_items, has_committed_real_load, intended_as_new_entry,
724 pending_offset_to_send, current_offset_to_send, current_length_to_send, 724 pending_offset_to_send, current_offset_to_send, current_length_to_send,
725 IsViewSourceMode(), should_clear_history_list()); 725 IsViewSourceMode(), should_clear_history_list(), false);
726 #if defined(OS_ANDROID) 726 #if defined(OS_ANDROID)
727 if (GetDataURLAsString() && 727 if (GetDataURLAsString() &&
728 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { 728 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) {
729 // The number of characters that is enough for validating a data: URI. From 729 // The number of characters that is enough for validating a data: URI. From
730 // the GURL's POV, the only important part here is scheme, it doesn't check 730 // the GURL's POV, the only important part here is scheme, it doesn't check
731 // the actual content. Thus we can take only the prefix of the url, to avoid 731 // the actual content. Thus we can take only the prefix of the url, to avoid
732 // unneeded copying of a potentially long string. 732 // unneeded copying of a potentially long string.
733 const size_t kDataUriPrefixMaxLen = 64; 733 const size_t kDataUriPrefixMaxLen = 64;
734 GURL data_url(std::string( 734 GURL data_url(std::string(
735 GetDataURLAsString()->front_as<char>(), 735 GetDataURLAsString()->front_as<char>(),
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 return node; 913 return node;
914 914
915 // Enqueue any children and keep looking. 915 // Enqueue any children and keep looking.
916 for (auto* child : node->children) 916 for (auto* child : node->children)
917 work_queue.push(child); 917 work_queue.push(child);
918 } 918 }
919 return nullptr; 919 return nullptr;
920 } 920 }
921 921
922 } // namespace content 922 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | content/common/navigation_params.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698