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

Side by Side Diff: content/browser/webui/web_ui_impl.h

Issue 2002633002: PlzNavigate: fix issue preventing navigations to WebUIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now checking when ready to commit Created 4 years, 6 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 #ifndef CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_
6 #define CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ 6 #define CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_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/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "content/public/browser/web_ui.h" 16 #include "content/public/browser/web_ui.h"
17 #include "ipc/ipc_listener.h" 17 #include "ipc/ipc_listener.h"
18 18
19 namespace content { 19 namespace content {
20 class RenderFrameHost; 20 class RenderFrameHost;
21 class RenderProcessHost;
21 class RenderViewHost; 22 class RenderViewHost;
22 23
23 class CONTENT_EXPORT WebUIImpl : public WebUI, 24 class CONTENT_EXPORT WebUIImpl : public WebUI,
24 public IPC::Listener, 25 public IPC::Listener,
25 public base::SupportsWeakPtr<WebUIImpl> { 26 public base::SupportsWeakPtr<WebUIImpl> {
26 public: 27 public:
28 static bool RenderProcessAllowedForURL(RenderProcessHost* process,
29 const GURL& url);
Charlie Reis 2016/05/25 21:38:02 nit: Wrong indent, add blank line after, and pleas
27 WebUIImpl(WebContents* contents, const std::string& frame_name); 30 WebUIImpl(WebContents* contents, const std::string& frame_name);
28 ~WebUIImpl() override; 31 ~WebUIImpl() override;
29 32
30 // Called when a RenderView is created for a WebUI (reload after a renderer 33 // Called when a RenderView is created for a WebUI (reload after a renderer
31 // crash) or when a WebUI is created for an RenderView (i.e. navigating from 34 // crash) or when a WebUI is created for an RenderView (i.e. navigating from
32 // chrome://downloads to chrome://bookmarks) or when both are new (i.e. 35 // chrome://downloads to chrome://bookmarks) or when both are new (i.e.
33 // opening a new tab). 36 // opening a new tab).
34 void RenderViewCreated(RenderViewHost* render_view_host); 37 void RenderViewCreated(RenderViewHost* render_view_host);
35 38
36 // Called when a RenderView is reused for the same WebUI type (i.e. reload). 39 // Called when a RenderView is reused for the same WebUI type (i.e. reload).
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const std::string frame_name_; 122 const std::string frame_name_;
120 123
121 std::unique_ptr<WebUIController> controller_; 124 std::unique_ptr<WebUIController> controller_;
122 125
123 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); 126 DISALLOW_COPY_AND_ASSIGN(WebUIImpl);
124 }; 127 };
125 128
126 } // namespace content 129 } // namespace content
127 130
128 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ 131 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698