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 #include "chrome/renderer/chrome_render_view_observer.h" | 5 #include "chrome/renderer/chrome_render_view_observer.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 11 #include "base/command_line.h" |
10 #include "base/debug/crash_logging.h" | 12 #include "base/debug/crash_logging.h" |
11 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
12 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
15 #include "base/trace_event/trace_event.h" | 17 #include "base/trace_event/trace_event.h" |
| 18 #include "build/build_config.h" |
16 #include "chrome/common/chrome_constants.h" | 19 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/common/crash_keys.h" | 20 #include "chrome/common/crash_keys.h" |
18 #include "chrome/common/render_messages.h" | 21 #include "chrome/common/render_messages.h" |
19 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
20 #include "chrome/renderer/prerender/prerender_helper.h" | 23 #include "chrome/renderer/prerender/prerender_helper.h" |
21 #include "chrome/renderer/web_apps.h" | 24 #include "chrome/renderer/web_apps.h" |
22 #include "components/web_cache/renderer/web_cache_render_process_observer.h" | 25 #include "components/web_cache/renderer/web_cache_render_process_observer.h" |
23 #include "content/public/common/bindings_policy.h" | 26 #include "content/public/common/bindings_policy.h" |
24 #include "content/public/renderer/content_renderer_client.h" | 27 #include "content/public/renderer/content_renderer_client.h" |
25 #include "content/public/renderer/render_frame.h" | 28 #include "content/public/renderer/render_frame.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 void ChromeRenderViewObserver::DidStartLoading() { | 162 void ChromeRenderViewObserver::DidStartLoading() { |
160 if ((render_view()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) && | 163 if ((render_view()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) && |
161 !webui_javascript_.empty()) { | 164 !webui_javascript_.empty()) { |
162 for (size_t i = 0; i < webui_javascript_.size(); ++i) { | 165 for (size_t i = 0; i < webui_javascript_.size(); ++i) { |
163 render_view()->GetMainRenderFrame()->ExecuteJavaScript( | 166 render_view()->GetMainRenderFrame()->ExecuteJavaScript( |
164 webui_javascript_[i]); | 167 webui_javascript_[i]); |
165 } | 168 } |
166 webui_javascript_.clear(); | 169 webui_javascript_.clear(); |
167 } | 170 } |
168 } | 171 } |
OLD | NEW |