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

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

Issue 150207: Foundations for Print Preview and Setup... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 // to, for example, opening a new window). 1478 // to, for example, opening a new window).
1479 // But we sometimes navigate to about:blank to clear a tab, and we want to 1479 // But we sometimes navigate to about:blank to clear a tab, and we want to
1480 // still allow that. 1480 // still allow that.
1481 if (disposition == CURRENT_TAB && is_content_initiated && 1481 if (disposition == CURRENT_TAB && is_content_initiated &&
1482 frame->GetParent() == NULL && !url.SchemeIs(chrome::kAboutScheme)) { 1482 frame->GetParent() == NULL && !url.SchemeIs(chrome::kAboutScheme)) {
1483 // When we received such unsolicited navigations, we sometimes want to 1483 // When we received such unsolicited navigations, we sometimes want to
1484 // punt them up to the browser to handle. 1484 // punt them up to the browser to handle.
1485 if (BindingsPolicy::is_dom_ui_enabled(enabled_bindings_) || 1485 if (BindingsPolicy::is_dom_ui_enabled(enabled_bindings_) ||
1486 BindingsPolicy::is_extension_enabled(enabled_bindings_) || 1486 BindingsPolicy::is_extension_enabled(enabled_bindings_) ||
1487 frame->GetInViewSourceMode() || 1487 frame->GetInViewSourceMode() ||
1488 url.SchemeIs(chrome::kViewSourceScheme)) { 1488 url.SchemeIs(chrome::kViewSourceScheme) ||
1489 url.SchemeIs(chrome::kPrintScheme)) {
1489 OpenURL(webview, url, GURL(), disposition); 1490 OpenURL(webview, url, GURL(), disposition);
1490 return IGNORE_ACTION; // Suppress the load here. 1491 return IGNORE_ACTION; // Suppress the load here.
1491 } 1492 }
1492 } 1493 }
1493 1494
1494 // Detect when a page is "forking" a new tab that can be safely rendered in 1495 // Detect when a page is "forking" a new tab that can be safely rendered in
1495 // its own process. This is done by sites like Gmail that try to open links 1496 // its own process. This is done by sites like Gmail that try to open links
1496 // in new windows without script connections back to the original page. We 1497 // in new windows without script connections back to the original page. We
1497 // treat such cases as browser navigations (in which we will create a new 1498 // treat such cases as browser navigations (in which we will create a new
1498 // renderer for a cross-site navigation), rather than WebKit navigations. 1499 // renderer for a cross-site navigation), rather than WebKit navigations.
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 2953 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
2953 } 2954 }
2954 2955
2955 void RenderView::Print(WebFrame* frame, bool script_initiated) { 2956 void RenderView::Print(WebFrame* frame, bool script_initiated) {
2956 DCHECK(frame); 2957 DCHECK(frame);
2957 if (print_helper_.get() == NULL) { 2958 if (print_helper_.get() == NULL) {
2958 print_helper_.reset(new PrintWebViewHelper(this)); 2959 print_helper_.reset(new PrintWebViewHelper(this));
2959 } 2960 }
2960 print_helper_->Print(frame, script_initiated); 2961 print_helper_->Print(frame, script_initiated);
2961 } 2962 }
OLDNEW
« no previous file with comments | « chrome/common/url_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698