| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 return window_->GetExtraRenderViewHeight(); | 1402 return window_->GetExtraRenderViewHeight(); |
| 1403 } | 1403 } |
| 1404 | 1404 |
| 1405 void Browser::ViewSourceForTab(WebContents* source, const GURL& page_url) { | 1405 void Browser::ViewSourceForTab(WebContents* source, const GURL& page_url) { |
| 1406 DCHECK(source); | 1406 DCHECK(source); |
| 1407 chrome::ViewSource(this, source); | 1407 chrome::ViewSource(this, source); |
| 1408 } | 1408 } |
| 1409 | 1409 |
| 1410 void Browser::ViewSourceForFrame(WebContents* source, | 1410 void Browser::ViewSourceForFrame(WebContents* source, |
| 1411 const GURL& frame_url, | 1411 const GURL& frame_url, |
| 1412 const std::string& frame_content_state) { | 1412 const content::PageState& frame_page_state) { |
| 1413 DCHECK(source); | 1413 DCHECK(source); |
| 1414 chrome::ViewSource(this, source, frame_url, frame_content_state); | 1414 chrome::ViewSource(this, source, frame_url, frame_page_state); |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 void Browser::ShowRepostFormWarningDialog(WebContents* source) { | 1417 void Browser::ShowRepostFormWarningDialog(WebContents* source) { |
| 1418 TabModalConfirmDialog::Create(new RepostFormWarningController(source), | 1418 TabModalConfirmDialog::Create(new RepostFormWarningController(source), |
| 1419 source); | 1419 source); |
| 1420 } | 1420 } |
| 1421 | 1421 |
| 1422 bool Browser::ShouldCreateWebContents( | 1422 bool Browser::ShouldCreateWebContents( |
| 1423 WebContents* web_contents, | 1423 WebContents* web_contents, |
| 1424 int route_id, | 1424 int route_id, |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 if (contents && !allow_js_access) { | 2208 if (contents && !allow_js_access) { |
| 2209 contents->web_contents()->GetController().LoadURL( | 2209 contents->web_contents()->GetController().LoadURL( |
| 2210 target_url, | 2210 target_url, |
| 2211 content::Referrer(), | 2211 content::Referrer(), |
| 2212 content::PAGE_TRANSITION_LINK, | 2212 content::PAGE_TRANSITION_LINK, |
| 2213 std::string()); // No extra headers. | 2213 std::string()); // No extra headers. |
| 2214 } | 2214 } |
| 2215 | 2215 |
| 2216 return contents != NULL; | 2216 return contents != NULL; |
| 2217 } | 2217 } |
| OLD | NEW |