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

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

Issue 2548263002: [DevTools] Migrate dom, emulation, inspector, network, page and schema handlers to new generator. (Closed)
Patch Set: rebased atop of roll 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 2016 The Chromium Authors. All rights reserved. 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 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/devtools/page_navigation_throttle.h" 5 #include "content/browser/devtools/page_navigation_throttle.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "content/browser/devtools/protocol/page_handler.h" 8 #include "content/browser/devtools/protocol/page_handler.h"
9 #include "content/public/browser/navigation_handle.h" 9 #include "content/public/browser/navigation_handle.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 12
13 namespace content { 13 namespace content {
14 namespace devtools {
15 14
16 PageNavigationThrottle::PageNavigationThrottle( 15 PageNavigationThrottle::PageNavigationThrottle(
17 base::WeakPtr<page::PageHandler> page_handler, 16 base::WeakPtr<protocol::PageHandler> page_handler,
18 int navigation_id, 17 int navigation_id,
19 content::NavigationHandle* navigation_handle) 18 content::NavigationHandle* navigation_handle)
20 : content::NavigationThrottle(navigation_handle), 19 : content::NavigationThrottle(navigation_handle),
21 navigation_id_(navigation_id), 20 navigation_id_(navigation_id),
22 page_handler_(page_handler), 21 page_handler_(page_handler),
23 navigation_deferred_(false) {} 22 navigation_deferred_(false) {}
24 23
25 PageNavigationThrottle::~PageNavigationThrottle() { 24 PageNavigationThrottle::~PageNavigationThrottle() {
26 if (page_handler_) 25 if (page_handler_)
27 page_handler_->OnPageNavigationThrottleDisposed(navigation_id_); 26 page_handler_->OnPageNavigationThrottleDisposed(navigation_id_);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 NavigationThrottle::ThrottleCheckResult result) { 67 NavigationThrottle::ThrottleCheckResult result) {
69 if (!navigation_deferred_) 68 if (!navigation_deferred_)
70 return; 69 return;
71 navigation_deferred_ = false; 70 navigation_deferred_ = false;
72 navigation_handle()->CancelDeferredNavigation(result); 71 navigation_handle()->CancelDeferredNavigation(result);
73 72
74 // Do not add code after this as the PageNavigationThrottle may be deleted by 73 // Do not add code after this as the PageNavigationThrottle may be deleted by
75 // the line above. 74 // the line above.
76 } 75 }
77 76
78 } // namespace devtools
79 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/page_navigation_throttle.h ('k') | content/browser/devtools/protocol/color_picker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698