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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 9349010: Move handling of debug urls like chrome://crash, chrome://gpuclean to content. These are for test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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
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 "chrome/renderer/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/icon_messages.h" 16 #include "chrome/common/icon_messages.h"
17 #include "chrome/common/render_messages.h" 17 #include "chrome/common/render_messages.h"
18 #include "chrome/common/thumbnail_score.h" 18 #include "chrome/common/thumbnail_score.h"
19 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
20 #include "chrome/renderer/about_handler.h"
21 #include "chrome/renderer/chrome_render_process_observer.h" 20 #include "chrome/renderer/chrome_render_process_observer.h"
22 #include "chrome/renderer/content_settings_observer.h" 21 #include "chrome/renderer/content_settings_observer.h"
23 #include "chrome/renderer/extensions/extension_dispatcher.h" 22 #include "chrome/renderer/extensions/extension_dispatcher.h"
24 #include "chrome/renderer/external_host_bindings.h" 23 #include "chrome/renderer/external_host_bindings.h"
25 #include "chrome/renderer/frame_sniffer.h" 24 #include "chrome/renderer/frame_sniffer.h"
26 #include "chrome/renderer/prerender/prerender_helper.h" 25 #include "chrome/renderer/prerender/prerender_helper.h"
27 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" 26 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h"
28 #include "chrome/renderer/translate_helper.h" 27 #include "chrome/renderer/translate_helper.h"
29 #include "chrome/renderer/webview_color_overlay.h" 28 #include "chrome/renderer/webview_color_overlay.h"
30 #include "content/public/common/bindings_policy.h" 29 #include "content/public/common/bindings_policy.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 362
364 void ChromeRenderViewObserver::OnSetAsInterstitial() { 363 void ChromeRenderViewObserver::OnSetAsInterstitial() {
365 content_settings_->SetAsInterstitial(); 364 content_settings_->SetAsInterstitial();
366 } 365 }
367 366
368 void ChromeRenderViewObserver::Navigate(const GURL& url) { 367 void ChromeRenderViewObserver::Navigate(const GURL& url) {
369 // Execute cache clear operations that were postponed until a navigation 368 // Execute cache clear operations that were postponed until a navigation
370 // event (including tab reload). 369 // event (including tab reload).
371 if (chrome_render_process_observer_) 370 if (chrome_render_process_observer_)
372 chrome_render_process_observer_->ExecutePendingClearCache(); 371 chrome_render_process_observer_->ExecutePendingClearCache();
373 AboutHandler::MaybeHandle(url);
374 } 372 }
375 373
376 void ChromeRenderViewObserver::OnSetClientSidePhishingDetection( 374 void ChromeRenderViewObserver::OnSetClientSidePhishingDetection(
377 bool enable_phishing_detection) { 375 bool enable_phishing_detection) {
378 #if defined(ENABLE_SAFE_BROWSING) && !defined(OS_CHROMEOS) 376 #if defined(ENABLE_SAFE_BROWSING) && !defined(OS_CHROMEOS)
379 phishing_classifier_ = enable_phishing_detection ? 377 phishing_classifier_ = enable_phishing_detection ?
380 safe_browsing::PhishingClassifierDelegate::Create( 378 safe_browsing::PhishingClassifierDelegate::Create(
381 render_view(), NULL) : 379 render_view(), NULL) :
382 NULL; 380 NULL;
383 #endif 381 #endif
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 reinterpret_cast<const unsigned char*>(&data[0]); 1054 reinterpret_cast<const unsigned char*>(&data[0]);
1057 1055
1058 return decoder.Decode(src_data, data.size()); 1056 return decoder.Decode(src_data, data.size());
1059 } 1057 }
1060 return SkBitmap(); 1058 return SkBitmap();
1061 } 1059 }
1062 1060
1063 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { 1061 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) {
1064 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); 1062 return (strict_security_hosts_.find(host) != strict_security_hosts_.end());
1065 } 1063 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698