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 "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 #endif | 281 #endif |
282 | 282 |
283 Send(new ViewMsg_New(params)); | 283 Send(new ViewMsg_New(params)); |
284 | 284 |
285 // If it's enabled, tell the renderer to set up the Javascript bindings for | 285 // If it's enabled, tell the renderer to set up the Javascript bindings for |
286 // sending messages back to the browser. | 286 // sending messages back to the browser. |
287 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_)); | 287 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_)); |
288 // Let our delegate know that we created a RenderView. | 288 // Let our delegate know that we created a RenderView. |
289 delegate_->RenderViewCreated(this); | 289 delegate_->RenderViewCreated(this); |
290 | 290 |
291 // Invert the color scheme if a flag is set. | |
292 if (CommandLine::ForCurrentProcess()->HasSwitch( | |
293 switches::kInvertWebContent)) | |
294 Send(new ViewMsg_InvertWebContent(GetRoutingID(), true)); | |
295 | |
296 FOR_EACH_OBSERVER( | 291 FOR_EACH_OBSERVER( |
297 content::RenderViewHostObserver, observers_, RenderViewHostInitialized()); | 292 content::RenderViewHostObserver, observers_, RenderViewHostInitialized()); |
298 | 293 |
299 return true; | 294 return true; |
300 } | 295 } |
301 | 296 |
302 bool RenderViewHostImpl::IsRenderViewLive() const { | 297 bool RenderViewHostImpl::IsRenderViewLive() const { |
303 return GetProcess()->HasConnection() && renderer_initialized_; | 298 return GetProcess()->HasConnection() && renderer_initialized_; |
304 } | 299 } |
305 | 300 |
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 // can cause navigations to be ignored in OnMsgNavigate. | 1844 // can cause navigations to be ignored in OnMsgNavigate. |
1850 is_waiting_for_beforeunload_ack_ = false; | 1845 is_waiting_for_beforeunload_ack_ = false; |
1851 is_waiting_for_unload_ack_ = false; | 1846 is_waiting_for_unload_ack_ = false; |
1852 } | 1847 } |
1853 | 1848 |
1854 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1849 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1855 STLDeleteValues(&power_save_blockers_); | 1850 STLDeleteValues(&power_save_blockers_); |
1856 } | 1851 } |
1857 | 1852 |
1858 } // namespace content | 1853 } // namespace content |
OLD | NEW |