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_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 #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 namespace content { | 15 namespace content { |
16 class RenderViewHost; | 16 class RenderViewHost; |
17 } | 17 } |
18 | 18 |
19 class CONTENT_EXPORT WebUIImpl : public content::WebUI, | 19 class CONTENT_EXPORT WebUIImpl : public content::WebUI, |
20 public IPC::Channel::Listener { | 20 public IPC::Channel::Listener { |
21 public: | 21 public: |
22 explicit WebUIImpl(content::WebContents* contents); | 22 explicit WebUIImpl(content::WebContents* contents); |
23 virtual ~WebUIImpl(); | 23 virtual ~WebUIImpl(); |
24 | 24 |
25 // Called by TabContents when the RenderView is first created. This is *not* | 25 // Called by WebContentsImpl when the RenderView is first created. This is |
26 // called for every page load because in some cases RenderViewHostManager will | 26 // *not* called for every page load because in some cases |
27 // reuse RenderView instances. | 27 // RenderViewHostManager will reuse RenderView instances. |
28 void RenderViewCreated(content::RenderViewHost* render_view_host); | 28 void RenderViewCreated(content::RenderViewHost* render_view_host); |
29 | 29 |
30 // WebUI implementation: | 30 // WebUI implementation: |
31 virtual content::WebContents* GetWebContents() const OVERRIDE; | 31 virtual content::WebContents* GetWebContents() const OVERRIDE; |
32 virtual content::WebUIController* GetController() const OVERRIDE; | 32 virtual content::WebUIController* GetController() const OVERRIDE; |
33 virtual void SetController(content::WebUIController* controller) OVERRIDE; | 33 virtual void SetController(content::WebUIController* controller) OVERRIDE; |
34 virtual bool ShouldHideFavicon() const OVERRIDE; | 34 virtual bool ShouldHideFavicon() const OVERRIDE; |
35 virtual void HideFavicon() OVERRIDE; | 35 virtual void HideFavicon() OVERRIDE; |
36 virtual bool ShouldFocusLocationBarByDefault() const OVERRIDE; | 36 virtual bool ShouldFocusLocationBarByDefault() const OVERRIDE; |
37 virtual void FocusLocationBarByDefault() OVERRIDE; | 37 virtual void FocusLocationBarByDefault() OVERRIDE; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // The path for the iframe this WebUI is embedded in (empty if not in an | 108 // The path for the iframe this WebUI is embedded in (empty if not in an |
109 // iframe). | 109 // iframe). |
110 std::string frame_xpath_; | 110 std::string frame_xpath_; |
111 | 111 |
112 scoped_ptr<content::WebUIController> controller_; | 112 scoped_ptr<content::WebUIController> controller_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); | 114 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); |
115 }; | 115 }; |
116 | 116 |
117 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ | 117 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ |
OLD | NEW |