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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 11361046: Remove TabContents from TabModalConfirmDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing include Created 8 years, 1 month 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/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 const GURL& frame_url, 1484 const GURL& frame_url,
1485 const std::string& frame_content_state) { 1485 const std::string& frame_content_state) {
1486 DCHECK(source); 1486 DCHECK(source);
1487 TabContents* tab_contents = chrome::GetTabContentsAt(this, 1487 TabContents* tab_contents = chrome::GetTabContentsAt(this,
1488 tab_strip_model_->GetIndexOfWebContents(source)); 1488 tab_strip_model_->GetIndexOfWebContents(source));
1489 chrome::ViewSource(this, tab_contents, frame_url, frame_content_state); 1489 chrome::ViewSource(this, tab_contents, frame_url, frame_content_state);
1490 } 1490 }
1491 1491
1492 void Browser::ShowRepostFormWarningDialog(WebContents* source) { 1492 void Browser::ShowRepostFormWarningDialog(WebContents* source) {
1493 TabModalConfirmDialog::Create(new RepostFormWarningController(source), 1493 TabModalConfirmDialog::Create(new RepostFormWarningController(source),
1494 TabContents::FromWebContents(source)); 1494 source);
1495 } 1495 }
1496 1496
1497 bool Browser::ShouldCreateWebContents( 1497 bool Browser::ShouldCreateWebContents(
1498 WebContents* web_contents, 1498 WebContents* web_contents,
1499 int route_id, 1499 int route_id,
1500 WindowContainerType window_container_type, 1500 WindowContainerType window_container_type,
1501 const string16& frame_name, 1501 const string16& frame_name,
1502 const GURL& target_url) { 1502 const GURL& target_url) {
1503 if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) { 1503 if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) {
1504 // If a BackgroundContents is created, suppress the normal WebContents. 1504 // If a BackgroundContents is created, suppress the normal WebContents.
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 if (contents && !allow_js_access) { 2348 if (contents && !allow_js_access) {
2349 contents->web_contents()->GetController().LoadURL( 2349 contents->web_contents()->GetController().LoadURL(
2350 target_url, 2350 target_url,
2351 content::Referrer(), 2351 content::Referrer(),
2352 content::PAGE_TRANSITION_LINK, 2352 content::PAGE_TRANSITION_LINK,
2353 std::string()); // No extra headers. 2353 std::string()); // No extra headers.
2354 } 2354 }
2355 2355
2356 return contents != NULL; 2356 return contents != NULL;
2357 } 2357 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698