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

Side by Side Diff: content/browser/devtools/page_navigation_throttle.h

Issue 2132673002: Adding Navigation Throttles to DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files Created 4 years, 5 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PAGE_NAVIGATION_THROTTLE_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PAGE_NAVIGATION_THROTTLE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "content/public/browser/navigation_throttle.h"
11
12 namespace content {
13 namespace devtools {
14 namespace page {
15 class PageHandler;
16 } // namespace page
17
18 class PageNavigationThrottle : public content::NavigationThrottle {
19 public:
20 PageNavigationThrottle(base::WeakPtr<page::PageHandler> page_handler,
21 int navigation_id,
22 content::NavigationHandle* navigation_handle);
23 ~PageNavigationThrottle() override;
24
25 // content::NavigationThrottle implementation:
26 NavigationThrottle::ThrottleCheckResult WillStartRequest() override;
27 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override;
28 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override;
29
30 int navigation_id() const { return navigation_id_; }
31
32 std::string GetFrameId() const;
33
34 private:
35 int navigation_id_;
36 base::WeakPtr<page::PageHandler> page_handler_;
37
38 DISALLOW_COPY_AND_ASSIGN(PageNavigationThrottle);
39 };
40
41 } // namespace devtools
42 } // namespace content
43
44 #endif // CONTENT_BROWSER_DEVTOOLS_PAGE_NAVIGATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698