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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 if (!url.SchemeIs(chrome::kChromeUIScheme)) | 427 if (!url.SchemeIs(chrome::kChromeUIScheme)) |
428 return; | 428 return; |
429 if (url == GURL(chrome::kChromeUICrashURL)) { | 429 if (url == GURL(chrome::kChromeUICrashURL)) { |
430 CrashIntentionally(); | 430 CrashIntentionally(); |
431 } else if (url == GURL(chrome::kChromeUIKillURL)) { | 431 } else if (url == GURL(chrome::kChromeUIKillURL)) { |
432 base::KillProcess(base::GetCurrentProcessHandle(), 1, false); | 432 base::KillProcess(base::GetCurrentProcessHandle(), 1, false); |
433 } else if (url == GURL(chrome::kChromeUIHangURL)) { | 433 } else if (url == GURL(chrome::kChromeUIHangURL)) { |
434 for (;;) { | 434 for (;;) { |
435 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); | 435 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); |
436 } | 436 } |
437 } else if (url == GURL(chrome::kChromeUIShorthangURL)) { | 437 } else if (url == GURL(kChromeUIShorthangURL)) { |
438 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); | 438 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); |
439 } | 439 } |
440 } | 440 } |
441 | 441 |
442 // Returns false unless this is a top-level navigation. | 442 // Returns false unless this is a top-level navigation. |
443 static bool IsTopLevelNavigation(WebFrame* frame) { | 443 static bool IsTopLevelNavigation(WebFrame* frame) { |
444 return frame->parent() == NULL; | 444 return frame->parent() == NULL; |
445 } | 445 } |
446 | 446 |
447 // Returns false unless this is a top-level navigation that crosses origins. | 447 // Returns false unless this is a top-level navigation that crosses origins. |
(...skipping 5880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6328 } | 6328 } |
6329 #endif | 6329 #endif |
6330 | 6330 |
6331 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6331 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6332 TransportDIB::Handle dib_handle) { | 6332 TransportDIB::Handle dib_handle) { |
6333 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6333 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6334 RenderProcess::current()->ReleaseTransportDIB(dib); | 6334 RenderProcess::current()->ReleaseTransportDIB(dib); |
6335 } | 6335 } |
6336 | 6336 |
6337 } // namespace content | 6337 } // namespace content |
OLD | NEW |