OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 5 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 9 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
10 #include "chrome/common/bindings_policy.h" | |
11 #include "content/browser/renderer_host/render_view_host.h" | 10 #include "content/browser/renderer_host/render_view_host.h" |
12 #include "content/browser/tab_contents/tab_contents.h" | 11 #include "content/browser/tab_contents/tab_contents.h" |
| 12 #include "content/common/bindings_policy.h" |
13 | 13 |
14 static base::LazyInstance<PropertyAccessor<ConstrainedHtmlUIDelegate*> > | 14 static base::LazyInstance<PropertyAccessor<ConstrainedHtmlUIDelegate*> > |
15 g_constrained_html_ui_property_accessor(base::LINKER_INITIALIZED); | 15 g_constrained_html_ui_property_accessor(base::LINKER_INITIALIZED); |
16 | 16 |
17 ConstrainedHtmlUI::ConstrainedHtmlUI(TabContents* contents) | 17 ConstrainedHtmlUI::ConstrainedHtmlUI(TabContents* contents) |
18 : WebUI(contents) { | 18 : WebUI(contents) { |
19 } | 19 } |
20 | 20 |
21 ConstrainedHtmlUI::~ConstrainedHtmlUI() { | 21 ConstrainedHtmlUI::~ConstrainedHtmlUI() { |
22 } | 22 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 ConstrainedHtmlUIDelegate** property = | 60 ConstrainedHtmlUIDelegate** property = |
61 GetPropertyAccessor().GetProperty(tab_contents()->property_bag()); | 61 GetPropertyAccessor().GetProperty(tab_contents()->property_bag()); |
62 return property ? *property : NULL; | 62 return property ? *property : NULL; |
63 } | 63 } |
64 | 64 |
65 // static | 65 // static |
66 PropertyAccessor<ConstrainedHtmlUIDelegate*>& | 66 PropertyAccessor<ConstrainedHtmlUIDelegate*>& |
67 ConstrainedHtmlUI::GetPropertyAccessor() { | 67 ConstrainedHtmlUI::GetPropertyAccessor() { |
68 return g_constrained_html_ui_property_accessor.Get(); | 68 return g_constrained_html_ui_property_accessor.Get(); |
69 } | 69 } |
OLD | NEW |