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 CHROME_BROWSER_UI_WEBUI_UBER_UBER_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_UBER_UBER_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_UBER_UBER_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_UBER_UBER_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 // WebUIController implementation. | 26 // WebUIController implementation. |
27 virtual bool OverrideHandleWebUIMessage(const GURL& source_url, | 27 virtual bool OverrideHandleWebUIMessage(const GURL& source_url, |
28 const std::string& message, | 28 const std::string& message, |
29 const ListValue& args) OVERRIDE; | 29 const ListValue& args) OVERRIDE; |
30 | 30 |
31 // We forward these to |sub_uis_|. | 31 // We forward these to |sub_uis_|. |
32 virtual void RenderViewCreated( | 32 virtual void RenderViewCreated( |
33 content::RenderViewHost* render_view_host) OVERRIDE; | 33 content::RenderViewHost* render_view_host) OVERRIDE; |
34 virtual void RenderViewReused( | 34 virtual void RenderViewReused( |
35 content::RenderViewHost* render_view_host) OVERRIDE; | 35 content::RenderViewHost* render_view_host) OVERRIDE; |
36 virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; | |
37 | 36 |
38 private: | 37 private: |
39 // A map from URL origin to WebUI instance. | 38 // A map from URL origin to WebUI instance. |
40 typedef std::map<std::string, content::WebUI*> SubpageMap; | 39 typedef std::map<std::string, content::WebUI*> SubpageMap; |
41 | 40 |
42 // Creates and stores a WebUI for the given URL. | 41 // Creates and stores a WebUI for the given URL. |
43 void RegisterSubpage(const std::string& page_url); | 42 void RegisterSubpage(const std::string& page_url); |
44 | 43 |
45 // The WebUI*s in this map are owned. | 44 // The WebUI*s in this map are owned. |
46 SubpageMap sub_uis_; | 45 SubpageMap sub_uis_; |
(...skipping 12 matching lines...) Expand all Loading... |
59 virtual void Observe(int type, | 58 virtual void Observe(int type, |
60 const content::NotificationSource& source, | 59 const content::NotificationSource& source, |
61 const content::NotificationDetails& details) OVERRIDE; | 60 const content::NotificationDetails& details) OVERRIDE; |
62 | 61 |
63 content::NotificationRegistrar registrar_; | 62 content::NotificationRegistrar registrar_; |
64 | 63 |
65 DISALLOW_COPY_AND_ASSIGN(UberFrameUI); | 64 DISALLOW_COPY_AND_ASSIGN(UberFrameUI); |
66 }; | 65 }; |
67 | 66 |
68 #endif // CHROME_BROWSER_UI_WEBUI_UBER_UBER_UI_H_ | 67 #endif // CHROME_BROWSER_UI_WEBUI_UBER_UBER_UI_H_ |
OLD | NEW |