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> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 #if !defined(OS_ANDROID) | 75 #if !defined(OS_ANDROID) |
76 void ChromeRenderViewObserver::OnWebUIJavaScript( | 76 void ChromeRenderViewObserver::OnWebUIJavaScript( |
77 const base::string16& javascript) { | 77 const base::string16& javascript) { |
78 webui_javascript_.push_back(javascript); | 78 webui_javascript_.push_back(javascript); |
79 } | 79 } |
80 #endif | 80 #endif |
81 | 81 |
82 #if defined(OS_ANDROID) | 82 #if defined(OS_ANDROID) |
83 void ChromeRenderViewObserver::OnUpdateTopControlsState( | 83 void ChromeRenderViewObserver::OnUpdateTopControlsState( |
84 content::TopControlsState constraints, | 84 content::BrowserControlsState constraints, |
85 content::TopControlsState current, | 85 content::BrowserControlsState current, |
86 bool animate) { | 86 bool animate) { |
87 render_view()->UpdateTopControlsState(constraints, current, animate); | 87 render_view()->UpdateTopControlsState(constraints, current, animate); |
88 } | 88 } |
89 #endif | 89 #endif |
90 | 90 |
91 void ChromeRenderViewObserver::OnGetWebApplicationInfo() { | 91 void ChromeRenderViewObserver::OnGetWebApplicationInfo() { |
92 WebFrame* main_frame = render_view()->GetWebView()->mainFrame(); | 92 WebFrame* main_frame = render_view()->GetWebView()->mainFrame(); |
93 DCHECK(main_frame); | 93 DCHECK(main_frame); |
94 | 94 |
95 WebApplicationInfo web_app_info; | 95 WebApplicationInfo web_app_info; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 !webui_javascript_.empty()) { | 166 !webui_javascript_.empty()) { |
167 for (const auto& script : webui_javascript_) | 167 for (const auto& script : webui_javascript_) |
168 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script); | 168 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script); |
169 webui_javascript_.clear(); | 169 webui_javascript_.clear(); |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
173 void ChromeRenderViewObserver::OnDestruct() { | 173 void ChromeRenderViewObserver::OnDestruct() { |
174 delete this; | 174 delete this; |
175 } | 175 } |
OLD | NEW |