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

Side by Side Diff: content/public/test/test_browser_context.cc

Issue 38043004: Cancel MIDI permission request infobar on MIDIAccess stop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delay "requests_.Remove(it.GetCurrentKey());" until we're done using |it|. Created 7 years, 1 month 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
« no previous file with comments | « content/public/test/test_browser_context.h ('k') | content/renderer/media/midi_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/public/test/test_browser_context.h" 5 #include "content/public/test/test_browser_context.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/test/null_task_runner.h" 8 #include "base/test/null_task_runner.h"
9 #include "content/public/test/mock_resource_context.h" 9 #include "content/public/test/mock_resource_context.h"
10 #include "net/url_request/url_request_context.h" 10 #include "net/url_request/url_request_context.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 net::URLRequestContextGetter* 94 net::URLRequestContextGetter*
95 TestBrowserContext::GetMediaRequestContextForStoragePartition( 95 TestBrowserContext::GetMediaRequestContextForStoragePartition(
96 const base::FilePath& partition_path, 96 const base::FilePath& partition_path,
97 bool in_memory) { 97 bool in_memory) {
98 return NULL; 98 return NULL;
99 } 99 }
100 100
101 void TestBrowserContext::RequestMIDISysExPermission( 101 void TestBrowserContext::RequestMIDISysExPermission(
102 int render_process_id, 102 int render_process_id,
103 int render_view_id, 103 int render_view_id,
104 int bridge_id,
104 const GURL& requesting_frame, 105 const GURL& requesting_frame,
105 const MIDISysExPermissionCallback& callback) { 106 const MIDISysExPermissionCallback& callback) {
106 // Always reject requests for testing. 107 // Always reject requests for testing.
107 callback.Run(false); 108 callback.Run(false);
108 } 109 }
109 110
111 void TestBrowserContext::CancelMIDISysExPermissionRequest(
112 int render_process_id,
113 int render_view_id,
114 int bridge_id,
115 const GURL& requesting_frame) {
116 }
117
110 ResourceContext* TestBrowserContext::GetResourceContext() { 118 ResourceContext* TestBrowserContext::GetResourceContext() {
111 if (!resource_context_) 119 if (!resource_context_)
112 resource_context_.reset(new MockResourceContext( 120 resource_context_.reset(new MockResourceContext(
113 GetRequestContext()->GetURLRequestContext())); 121 GetRequestContext()->GetURLRequestContext()));
114 return resource_context_.get(); 122 return resource_context_.get();
115 } 123 }
116 124
117 GeolocationPermissionContext* 125 GeolocationPermissionContext*
118 TestBrowserContext::GetGeolocationPermissionContext() { 126 TestBrowserContext::GetGeolocationPermissionContext() {
119 return NULL; 127 return NULL;
120 } 128 }
121 129
122 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { 130 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() {
123 return special_storage_policy_.get(); 131 return special_storage_policy_.get();
124 } 132 }
125 133
126 } // namespace content 134 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_browser_context.h ('k') | content/renderer/media/midi_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698