summaryrefslogtreecommitdiffstats
path: root/content/browser/transition_request_manager.cc
diff options
context:
space:
mode:
authormorrita <morrita@chromium.org>2014-10-31 11:26:59 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-31 18:27:24 +0000
commitffb8261db9491e5d1ce9b9eb76941f99f7df7011 (patch)
treebba5750b966f904d1b4cb904e88243e2e782e923 /content/browser/transition_request_manager.cc
parent892dfc786a995249bf695d69f1309db60026dbfd (diff)
downloadchromium_src-ffb8261db9491e5d1ce9b9eb76941f99f7df7011.zip
chromium_src-ffb8261db9491e5d1ce9b9eb76941f99f7df7011.tar.gz
chromium_src-ffb8261db9491e5d1ce9b9eb76941f99f7df7011.tar.bz2
Revert of Navigation transitions (web to native app): Pass data after starting provisional load (Chrome side) (patchset #7 id:120001 of https://codereview.chromium.org/652953008/)
Reason for revert: Crashing a LayoutTest http://test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=fast/html/navigation-transition.html Hitting an assertion: 10:15:12.016 3607 [10283:10283:1031/101511:5678803780814:FATAL:transition_request_manager.cc(161)] Check failed: ::content::BrowserThread::CurrentlyOn(BrowserThread::IO). Must be called on Chrome_IOThread; actually called on CrBrowserMain. 10:15:12.016 3607 #0 0x7f66666664ce base::debug::StackTrace::StackTrace() 10:15:12.016 3607 #1 0x7f6666700bf5 logging::LogMessage::~LogMessage() 10:15:12.016 3607 #2 0x7f66612dcafa content::TransitionRequestManager::GetPendingTransitionRequest() 10:15:12.016 3607 #3 0x7f6660bccdb1 content::NavigatorImpl::DidStartProvisionalLoad() 10:15:12.016 3607 #4 0x7f6660bdb821 content::RenderFrameHostImpl::OnDidStartProvisionalLoadForFrame() 10:15:12.016 3607 #5 0x7f6660bf3554 DispatchToMethod<>() 10:15:12.016 3607 #6 0x7f6660be38b7 FrameHostMsg_DidStartProvisionalLoadForFrame::Dispatch<>() 10:15:12.016 3607 #7 0x7f6660bda57e content::RenderFrameHostImpl::OnMessageReceived() 10:15:12.016 3607 #8 0x7f666103ad0e content::RenderProcessHostImpl::OnMessageReceived() 10:15:12.016 3607 #9 0x7f666103b11f content::RenderProcessHostImpl::OnMessageReceived() 10:15:12.016 3607 #10 0x7f6664fe5e9d IPC::ChannelProxy::Context::OnDispatchMessage() 10:15:12.016 3607 #11 0x7f6664feea5a base::internal::RunnableAdapter<>::Run() 10:15:12.016 3607 #12 0x7f6664fee9b1 base::internal::InvokeHelper<>::MakeItSo() 10:15:12.016 3607 #13 0x7f6664fee94c base::internal::Invoker<>::Run() 10:15:12.016 3607 #14 0x7f666664eb3e base::Callback<>::Run() 10:15:12.016 3607 #15 0x7f666666cb89 base::debug::TaskAnnotator::RunTask() 10:15:12.016 3607 #16 0x7f6666729968 base::MessageLoop::RunTask() 10:15:12.016 3607 #17 0x7f6666729acb base::MessageLoop::DeferOrRunPendingTask() 10:15:12.016 3607 #18 0x7f6666729d05 base::MessageLoop::DoWork() 10:15:12.016 3607 #19 0x7f66666227bc base::MessagePumpGlib::HandleDispatch() 10:15:12.016 3607 #20 0x7f6666622fd1 base::(anonymous namespace)::WorkSourceDispatch() 10:15:12.016 3607 #21 0x7f6658588d13 g_main_context_dispatch 10:15:12.016 3607 #22 0x7f6658589060 <unknown> 10:15:12.016 3607 #23 0x7f6658589124 g_main_context_iteration 10:15:12.016 3607 #24 0x7f66666228c5 base::MessagePumpGlib::Run() 10:15:12.016 3607 #25 0x7f6666729432 base::MessageLoop::RunHandler() 10:15:12.016 3607 #26 0x7f66667920d4 base::RunLoop::Run() 10:15:12.016 3607 #27 0x7f66609ca164 content::BrowserMainLoop::MainMessageLoopRun() 10:15:12.016 3607 #28 0x7f66609c9fc1 content::BrowserMainLoop::RunMainMessageLoopParts() 10:15:12.016 3607 #29 0x7f66609d3075 content::BrowserMainRunnerImpl::Run() 10:15:12.016 3607 #30 0x000000452ef4 (anonymous namespace)::RunOneTest() 10:15:12.016 3607 #31 0x000000452b53 (anonymous namespace)::RunTests() 10:15:12.016 3607 #32 0x0000004529af LayoutTestBrowserMain() 10:15:12.016 3607 #33 0x00000044fcda content::ShellMainDelegate::RunProcess() 10:15:12.017 3607 #34 0x7f6660849f01 content::RunNamedProcessTypeMain() 10:15:12.017 3607 #35 0x7f666084e232 content::ContentMainRunnerImpl::Run() 10:15:12.017 3607 #36 0x7f66608493f5 content::ContentMain() 10:15:12.017 3607 #37 0x00000044ee5c main 10:15:12.017 3607 #38 0x7f665785676d __libc_start_main 10:15:12.017 3607 #39 0x00000044ed49 <unknown> Original issue's description: > Navigation transitions (web to native app): Pass data after starting provisional load (Chrome side) > > Pass transitional elements' CSS selector, names and rects to TransitionPageHelper after starting provisional load. Those data are needed when overriding the URL navigation to jump to a native Android app. > > The is the Chrome side of the CL. The Clank side is here: https://chrome-internal-review.googlesource.com/#/c/180668/ > > BUG=370696 > > Committed: https://crrev.com/5b846f579d3dd1a0f4d0b8c26ff274117bfba0bc > Cr-Commit-Position: refs/heads/master@{#302279} TBR=nasko@chromium.org,sievers@chromium.org,oysteine@chromium.org,zhenw@chromium.org NOTREECHECKS=true NOTRY=true BUG=370696 Review URL: https://codereview.chromium.org/689123003 Cr-Commit-Position: refs/heads/master@{#302284}
Diffstat (limited to 'content/browser/transition_request_manager.cc')
-rw-r--r--content/browser/transition_request_manager.cc25
1 files changed, 16 insertions, 9 deletions
diff --git a/content/browser/transition_request_manager.cc b/content/browser/transition_request_manager.cc
index e3f4317..b863991 100644
--- a/content/browser/transition_request_manager.cc
+++ b/content/browser/transition_request_manager.cc
@@ -86,11 +86,13 @@ TransitionRequestManager::TransitionRequestData::AllowedEntry::AllowedEntry(
const std::string& allowed_destination_host_pattern,
const std::string& css_selector,
const std::string& markup,
- const std::vector<TransitionElement>& elements)
+ const std::vector<std::string>& names,
+ const std::vector<gfx::Rect>& rects)
: allowed_destination_host_pattern(allowed_destination_host_pattern),
css_selector(css_selector),
markup(markup),
- elements(elements) {
+ names(names),
+ rects(rects) {
}
TransitionRequestManager::TransitionRequestData::AllowedEntry::~AllowedEntry() {
@@ -127,11 +129,13 @@ void TransitionRequestManager::TransitionRequestData::AddEntry(
const std::string& allowed_destination_host_pattern,
const std::string& css_selector,
const std::string& markup,
- const std::vector<TransitionElement>& elements) {
+ const std::vector<std::string>& names,
+ const std::vector<gfx::Rect>& rects) {
allowed_entries_.push_back(AllowedEntry(allowed_destination_host_pattern,
css_selector,
markup,
- elements));
+ names,
+ rects));
}
bool TransitionRequestManager::TransitionRequestData::FindEntry(
@@ -149,11 +153,12 @@ bool TransitionRequestManager::TransitionRequestData::FindEntry(
const AllowedEntry& allowed_entry = allowed_entries_[0];
transition_data->markup = allowed_entry.markup;
transition_data->css_selector = allowed_entry.css_selector;
- transition_data->elements = allowed_entry.elements;
+ transition_data->names = allowed_entry.names;
+ transition_data->rects = allowed_entry.rects;
return true;
}
-bool TransitionRequestManager::GetPendingTransitionRequest(
+bool TransitionRequestManager::HasPendingTransitionRequest(
int render_process_id,
int render_frame_id,
const GURL& request_url,
@@ -173,12 +178,13 @@ void TransitionRequestManager::AddPendingTransitionRequestData(
const std::string& allowed_destination_host_pattern,
const std::string& css_selector,
const std::string& markup,
- const std::vector<TransitionElement>& elements) {
+ const std::vector<std::string>& names,
+ const std::vector<gfx::Rect>& rects) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
std::pair<int, int> key(render_process_id, render_frame_id);
pending_transition_frames_[key].AddEntry(
- allowed_destination_host_pattern, css_selector, markup, elements);
+ allowed_destination_host_pattern, css_selector, markup, names, rects);
}
void TransitionRequestManager::AddPendingTransitionRequestDataForTesting(
@@ -191,7 +197,8 @@ void TransitionRequestManager::AddPendingTransitionRequestDataForTesting(
"*", /* allowed_destination_host_pattern */
"", /* css_selector */
"", /* markup */
- std::vector<TransitionElement>()); /* elements */
+ std::vector<std::string>(), /* names */
+ std::vector<gfx::Rect>()); /* rects */
}
void TransitionRequestManager::ClearPendingTransitionRequestData(