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

Side by Side Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: rebase Created 4 years 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 #ifndef CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 6 #define CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "chrome/browser/external_protocol/external_protocol_handler.h" 15 #include "chrome/browser/external_protocol/external_protocol_handler.h"
16 #include "content/public/browser/resource_dispatcher_host_delegate.h" 16 #include "content/public/browser/resource_dispatcher_host_delegate.h"
17 #include "content/public/common/previews_state.h"
17 #include "extensions/features/features.h" 18 #include "extensions/features/features.h"
18 19
19 class DownloadRequestLimiter; 20 class DownloadRequestLimiter;
20 21
21 namespace content { 22 namespace content {
22 class NavigationData; 23 class NavigationData;
23 } 24 }
24 25
25 namespace extensions { 26 namespace extensions {
26 class UserScriptListener; 27 class UserScriptListener;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void OnStreamCreated(net::URLRequest* request, 76 void OnStreamCreated(net::URLRequest* request,
76 std::unique_ptr<content::StreamInfo> stream) override; 77 std::unique_ptr<content::StreamInfo> stream) override;
77 void OnResponseStarted(net::URLRequest* request, 78 void OnResponseStarted(net::URLRequest* request,
78 content::ResourceContext* resource_context, 79 content::ResourceContext* resource_context,
79 content::ResourceResponse* response) override; 80 content::ResourceResponse* response) override;
80 void OnRequestRedirected(const GURL& redirect_url, 81 void OnRequestRedirected(const GURL& redirect_url,
81 net::URLRequest* request, 82 net::URLRequest* request,
82 content::ResourceContext* resource_context, 83 content::ResourceContext* resource_context,
83 content::ResourceResponse* response) override; 84 content::ResourceResponse* response) override;
84 void RequestComplete(net::URLRequest* url_request) override; 85 void RequestComplete(net::URLRequest* url_request) override;
85 bool ShouldEnableLoFiMode( 86 content::PreviewsState GetPreviewsState(
Nico 2017/01/09 22:35:03 I'm confused about this. The enum definition looks
megjablon 2017/01/10 22:30:01 The states aren't mutually exclusive. Server Lo-Fi
Nico 2017/01/11 01:14:47 I think some integer type is more natural for a bi
megjablon 2017/01/12 17:56:29 Done.
86 const net::URLRequest& url_request, 87 const net::URLRequest& url_request,
87 content::ResourceContext* resource_context) override; 88 content::ResourceContext* resource_context) override;
88 content::NavigationData* GetNavigationData( 89 content::NavigationData* GetNavigationData(
89 net::URLRequest* request) const override; 90 net::URLRequest* request) const override;
90 std::unique_ptr<net::ClientCertStore> CreateClientCertStore( 91 std::unique_ptr<net::ClientCertStore> CreateClientCertStore(
91 content::ResourceContext* resource_context) override; 92 content::ResourceContext* resource_context) override;
92 void OnAbortedFrameLoad(const GURL& url, 93 void OnAbortedFrameLoad(const GURL& url,
93 base::TimeDelta request_loading_time) override; 94 base::TimeDelta request_loading_time) override;
94 95
95 // Called on the UI thread. Allows switching out the 96 // Called on the UI thread. Allows switching out the
(...skipping 21 matching lines...) Expand all
117 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; 118 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_;
118 #if BUILDFLAG(ENABLE_EXTENSIONS) 119 #if BUILDFLAG(ENABLE_EXTENSIONS)
119 scoped_refptr<extensions::UserScriptListener> user_script_listener_; 120 scoped_refptr<extensions::UserScriptListener> user_script_listener_;
120 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; 121 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_;
121 #endif 122 #endif
122 123
123 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); 124 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate);
124 }; 125 };
125 126
126 #endif // CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 127 #endif // CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698