OLD | NEW |
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_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ |
6 #define CONTENT_BROWSER_WEBUI_WEB_UI_H_ | 6 #define CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "content/public/browser/web_ui.h" | 12 #include "content/public/browser/web_ui.h" |
13 #include "ipc/ipc_channel.h" | 13 #include "ipc/ipc_channel.h" |
14 | 14 |
15 class RenderViewHost; | 15 class RenderViewHost; |
16 | 16 |
17 class CONTENT_EXPORT WebUI : public content::WebUI, | 17 class CONTENT_EXPORT WebUIImpl : public content::WebUI, |
18 public IPC::Channel::Listener { | 18 public IPC::Channel::Listener { |
19 public: | 19 public: |
20 explicit WebUI(content::WebContents* contents); | 20 explicit WebUIImpl(content::WebContents* contents); |
21 virtual ~WebUI(); | 21 virtual ~WebUIImpl(); |
22 | 22 |
23 // Called by TabContents when the RenderView is first created. This is *not* | 23 // Called by TabContents when the RenderView is first created. This is *not* |
24 // called for every page load because in some cases RenderViewHostManager will | 24 // called for every page load because in some cases RenderViewHostManager will |
25 // reuse RenderView instances. | 25 // reuse RenderView instances. |
26 void RenderViewCreated(RenderViewHost* render_view_host); | 26 void RenderViewCreated(RenderViewHost* render_view_host); |
27 | 27 |
28 // WebUI implementation: | 28 // WebUI implementation: |
29 virtual content::WebContents* GetWebContents() const OVERRIDE; | 29 virtual content::WebContents* GetWebContents() const OVERRIDE; |
30 virtual content::WebUIController* GetController() const OVERRIDE; | 30 virtual content::WebUIController* GetController() const OVERRIDE; |
31 virtual void SetController(content::WebUIController* controller) OVERRIDE; | 31 virtual void SetController(content::WebUIController* controller) OVERRIDE; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Non-owning pointer to the WebContents this WebUI is associated with. | 103 // Non-owning pointer to the WebContents this WebUI is associated with. |
104 content::WebContents* web_contents_; | 104 content::WebContents* web_contents_; |
105 | 105 |
106 // The path for the iframe this WebUI is embedded in (empty if not in an | 106 // The path for the iframe this WebUI is embedded in (empty if not in an |
107 // iframe). | 107 // iframe). |
108 std::string frame_xpath_; | 108 std::string frame_xpath_; |
109 | 109 |
110 scoped_ptr<content::WebUIController> controller_; | 110 scoped_ptr<content::WebUIController> controller_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(WebUI); | 112 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); |
113 }; | 113 }; |
114 | 114 |
115 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_H_ | 115 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ |
OLD | NEW |