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 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/public/browser/web_ui.h" | 13 #include "content/public/browser/web_ui.h" |
14 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class RenderViewHost; | 17 class RenderViewHost; |
18 | 18 |
19 class CONTENT_EXPORT WebUIImpl : public WebUI, | 19 class CONTENT_EXPORT WebUIImpl : public WebUI, |
20 public IPC::Listener, | 20 public IPC::Listener, |
21 public base::SupportsWeakPtr<WebUIImpl> { | 21 public base::SupportsWeakPtr<WebUIImpl> { |
22 public: | 22 public: |
23 explicit WebUIImpl(WebContents* contents); | 23 explicit WebUIImpl(WebContents* contents); |
24 virtual ~WebUIImpl(); | 24 virtual ~WebUIImpl(); |
25 | 25 |
26 // Called by WebContentsImpl when the RenderView is first created. This is | 26 // Called by WebContentsImpl when the RenderView is first created. This is |
27 // *not* called for every page load because in some cases | 27 // *not* called for every page load because in some cases |
28 // RenderViewHostManager will reuse RenderView instances. | 28 // RenderFrameHostManager will reuse RenderView instances. |
29 void RenderViewCreated(RenderViewHost* render_view_host); | 29 void RenderViewCreated(RenderViewHost* render_view_host); |
30 | 30 |
31 // WebUI implementation: | 31 // WebUI implementation: |
32 virtual WebContents* GetWebContents() const OVERRIDE; | 32 virtual WebContents* GetWebContents() const OVERRIDE; |
33 virtual WebUIController* GetController() const OVERRIDE; | 33 virtual WebUIController* GetController() const OVERRIDE; |
34 virtual void SetController(WebUIController* controller) OVERRIDE; | 34 virtual void SetController(WebUIController* controller) OVERRIDE; |
35 virtual ui::ScaleFactor GetDeviceScaleFactor() const OVERRIDE; | 35 virtual ui::ScaleFactor GetDeviceScaleFactor() const OVERRIDE; |
36 virtual const string16& GetOverriddenTitle() const OVERRIDE; | 36 virtual const string16& GetOverriddenTitle() const OVERRIDE; |
37 virtual void OverrideTitle(const string16& title) OVERRIDE; | 37 virtual void OverrideTitle(const string16& title) OVERRIDE; |
38 virtual PageTransition GetLinkTransitionType() const OVERRIDE; | 38 virtual PageTransition GetLinkTransitionType() const OVERRIDE; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 std::string frame_xpath_; | 102 std::string frame_xpath_; |
103 | 103 |
104 scoped_ptr<WebUIController> controller_; | 104 scoped_ptr<WebUIController> controller_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); | 106 DISALLOW_COPY_AND_ASSIGN(WebUIImpl); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace content | 109 } // namespace content |
110 | 110 |
111 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ | 111 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_IMPL_H_ |
OLD | NEW |