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

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

Issue 1352813006: Move WebUI ownership from the RenderFrameHostManager to the RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More test fixes and improvements but the code is stil a WIP! Created 5 years, 3 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 <set> 9 #include <set>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "content/public/browser/web_ui.h" 14 #include "content/public/browser/web_ui.h"
15 #include "ipc/ipc_listener.h" 15 #include "ipc/ipc_listener.h"
16 16
17 namespace content { 17 namespace content {
18 class RenderFrameHost; 18 class RenderFrameHost;
19 class RenderViewHost; 19 class RenderViewHost;
20 20
21 class CONTENT_EXPORT WebUIImpl : public WebUI, 21 class CONTENT_EXPORT WebUIImpl : public WebUI,
22 public IPC::Listener, 22 public IPC::Listener,
23 public base::SupportsWeakPtr<WebUIImpl> { 23 public base::SupportsWeakPtr<WebUIImpl> {
24 public: 24 public:
25 WebUIImpl(WebContents* contents, const std::string& frame_name); 25 WebUIImpl(WebContents* contents, const std::string& frame_name);
26 ~WebUIImpl() override; 26 ~WebUIImpl() override;
27 27
28 // Called by WebContentsImpl when the RenderView is first created. This is
29 // *not* called for every page load because in some cases
30 // RenderFrameHostManager will reuse RenderView instances.
31 void RenderViewCreated(RenderViewHost* render_view_host);
32
33 // WebUI implementation: 28 // WebUI implementation:
34 WebContents* GetWebContents() const override; 29 WebContents* GetWebContents() const override;
35 WebUIController* GetController() const override; 30 WebUIController* GetController() const override;
36 void SetController(WebUIController* controller) override; 31 void SetController(WebUIController* controller) override;
37 float GetDeviceScaleFactor() const override; 32 float GetDeviceScaleFactor() const override;
38 const base::string16& GetOverriddenTitle() const override; 33 const base::string16& GetOverriddenTitle() const override;
39 void OverrideTitle(const base::string16& title) override; 34 void OverrideTitle(const base::string16& title) override;
40 ui::PageTransition GetLinkTransitionType() const override; 35 ui::PageTransition GetLinkTransitionType() const override;
41 void SetLinkTransitionType(ui::PageTransition type) override; 36 void SetLinkTransitionType(ui::PageTransition type) override;
42 int GetBindings() const override; 37 int GetBindings() const override;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const std::string frame_name_; 106 const std::string frame_name_;
112 107
113 scoped_ptr<WebUIController> controller_; 108 scoped_ptr<WebUIController> controller_;
114 109
115 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); 110 DISALLOW_COPY_AND_ASSIGN(WebUIImpl);
116 }; 111 };
117 112
118 } // namespace content 113 } // namespace content
119 114
120 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ 115 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698