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

Side by Side Diff: content/browser/loader/resource_scheduler_filter.cc

Issue 636863003: Make SpeechRecognition per RenderFrame instead of per RenderView. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/loader/resource_scheduler_filter.h" 5 #include "content/browser/loader/resource_scheduler_filter.h"
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 #include "content/browser/loader/resource_scheduler.h" 8 #include "content/browser/loader/resource_scheduler.h"
9 #include "content/common/frame_messages.h" 9 #include "content/common/frame_messages.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 29 matching lines...) Expand all
40 PickleIterator iter(message); 40 PickleIterator iter(message);
41 FrameHostMsg_DidCommitProvisionalLoad_Params params; 41 FrameHostMsg_DidCommitProvisionalLoad_Params params;
42 if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>::Read( 42 if (!IPC::ParamTraits<FrameHostMsg_DidCommitProvisionalLoad_Params>::Read(
43 &message, &iter, &params)) { 43 &message, &iter, &params)) {
44 break; 44 break;
45 } 45 }
46 if (ui::PageTransitionIsMainFrame(params.transition) && 46 if (ui::PageTransitionIsMainFrame(params.transition) &&
47 !params.was_within_same_page) { 47 !params.was_within_same_page) {
48 // We need to track the RenderViewHost routing_id because of downstream 48 // We need to track the RenderViewHost routing_id because of downstream
49 // dependencies (crbug.com/392171 DownloadRequestHandle, 49 // dependencies (crbug.com/392171 DownloadRequestHandle,
50 // SaveFileManager, ResourceDispatcherHostImpl, MediaStreamUIProxy, 50 // SaveFileManager, ResourceDispatcherHostImpl, MediaStreamUIProxy, and
51 // SpeechRecognitionDispatcherHost and possibly others). They look up 51 // possibly others). They look up the view based on the ID stored in the
52 // the view based on the ID stored in the resource requests. 52 // resource requests. Once those dependencies are unwound or moved to
53 // Once those dependencies are unwound or moved to RenderFrameHost 53 // RenderFrameHost (crbug.com/304341) we can move the client to be based
54 // (crbug.com/304341) we can move the client to be based on the 54 // on the routing_id of the RenderFrameHost.
55 // routing_id of the RenderFrameHost.
56 scheduler->OnNavigate(child_id_, params.render_view_routing_id); 55 scheduler->OnNavigate(child_id_, params.render_view_routing_id);
57 } 56 }
58 break; 57 break;
59 } 58 }
60 59
61 case ViewHostMsg_WillInsertBody::ID: 60 case ViewHostMsg_WillInsertBody::ID:
62 scheduler->OnWillInsertBody(child_id_, message.routing_id()); 61 scheduler->OnWillInsertBody(child_id_, message.routing_id());
63 break; 62 break;
64 63
65 default: 64 default:
66 break; 65 break;
67 } 66 }
68 67
69 return false; 68 return false;
70 } 69 }
71 70
72 } // namespace content 71 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/speech_recognizer.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698