Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 12387070: content: Move more constants from url_constants.h into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/url_constants.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 NOINLINE static void CrashIntentionally() { 437 NOINLINE static void CrashIntentionally() {
438 // NOTE(shess): Crash directly rather than using NOTREACHED() so 438 // NOTE(shess): Crash directly rather than using NOTREACHED() so
439 // that the signature is easier to triage in crash reports. 439 // that the signature is easier to triage in crash reports.
440 volatile int* zero = NULL; 440 volatile int* zero = NULL;
441 *zero = 0; 441 *zero = 0;
442 } 442 }
443 443
444 static void MaybeHandleDebugURL(const GURL& url) { 444 static void MaybeHandleDebugURL(const GURL& url) {
445 if (!url.SchemeIs(chrome::kChromeUIScheme)) 445 if (!url.SchemeIs(chrome::kChromeUIScheme))
446 return; 446 return;
447 if (url == GURL(chrome::kChromeUICrashURL)) { 447 if (url == GURL(kChromeUICrashURL)) {
448 CrashIntentionally(); 448 CrashIntentionally();
449 } else if (url == GURL(chrome::kChromeUIKillURL)) { 449 } else if (url == GURL(kChromeUIKillURL)) {
450 base::KillProcess(base::GetCurrentProcessHandle(), 1, false); 450 base::KillProcess(base::GetCurrentProcessHandle(), 1, false);
451 } else if (url == GURL(chrome::kChromeUIHangURL)) { 451 } else if (url == GURL(kChromeUIHangURL)) {
452 for (;;) { 452 for (;;) {
453 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); 453 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1));
454 } 454 }
455 } else if (url == GURL(kChromeUIShorthangURL)) { 455 } else if (url == GURL(kChromeUIShorthangURL)) {
456 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); 456 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20));
457 } 457 }
458 } 458 }
459 459
460 // Returns false unless this is a top-level navigation. 460 // Returns false unless this is a top-level navigation.
461 static bool IsTopLevelNavigation(WebFrame* frame) { 461 static bool IsTopLevelNavigation(WebFrame* frame) {
(...skipping 6258 matching lines...) Expand 10 before | Expand all | Expand 10 after
6720 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6720 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6721 RenderProcess::current()->ReleaseTransportDIB(dib); 6721 RenderProcess::current()->ReleaseTransportDIB(dib);
6722 } 6722 }
6723 6723
6724 void RenderViewImpl::DidCommitCompositorFrame() { 6724 void RenderViewImpl::DidCommitCompositorFrame() {
6725 RenderWidget::DidCommitCompositorFrame(); 6725 RenderWidget::DidCommitCompositorFrame();
6726 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 6726 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6727 } 6727 }
6728 6728
6729 } // namespace content 6729 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698