OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/bug_report_ui.h" | 5 #include "chrome/browser/dom_ui/bug_report_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 if (((index == 0) && (params != "0")) || !browser || | 563 if (((index == 0) && (params != "0")) || !browser || |
564 index >= browser->tab_count()) { | 564 index >= browser->tab_count()) { |
565 return base::StringPiece( | 565 return base::StringPiece( |
566 ResourceBundle::GetSharedInstance().GetRawDataResource( | 566 ResourceBundle::GetSharedInstance().GetRawDataResource( |
567 IDR_BUGREPORT_HTML_INVALID)); | 567 IDR_BUGREPORT_HTML_INVALID)); |
568 } | 568 } |
569 | 569 |
570 TabContents* target_tab = browser->GetTabContentsAt(index); | 570 TabContents* target_tab = browser->GetTabContentsAt(index); |
571 if (target_tab) { | 571 if (target_tab) { |
572 target_tab_title_ = target_tab->GetTitle(); | 572 target_tab_title_ = target_tab->GetTitle(); |
573 target_tab_url_ = target_tab->controller().GetActiveEntry()->url().spec(); | 573 target_tab_url_ = target_tab->GetURL().spec(); |
574 } | 574 } |
575 | 575 |
576 // Setup the screenshot source after we've verified input is legit. | 576 // Setup the screenshot source after we've verified input is legit. |
577 SetupScreenshotsSource(); | 577 SetupScreenshotsSource(); |
578 | 578 |
579 return base::StringPiece( | 579 return base::StringPiece( |
580 ResourceBundle::GetSharedInstance().GetRawDataResource( | 580 ResourceBundle::GetSharedInstance().GetRawDataResource( |
581 IDR_BUGREPORT_HTML)); | 581 IDR_BUGREPORT_HTML)); |
582 } | 582 } |
583 | 583 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 BugReportUIHTMLSource* html_source = | 800 BugReportUIHTMLSource* html_source = |
801 new BugReportUIHTMLSource(handler->Init()); | 801 new BugReportUIHTMLSource(handler->Init()); |
802 // Set up the chrome://bugreport/ source. | 802 // Set up the chrome://bugreport/ source. |
803 BrowserThread::PostTask( | 803 BrowserThread::PostTask( |
804 BrowserThread::IO, FROM_HERE, | 804 BrowserThread::IO, FROM_HERE, |
805 NewRunnableMethod( | 805 NewRunnableMethod( |
806 ChromeURLDataManager::GetInstance(), | 806 ChromeURLDataManager::GetInstance(), |
807 &ChromeURLDataManager::AddDataSource, | 807 &ChromeURLDataManager::AddDataSource, |
808 make_scoped_refptr(html_source))); | 808 make_scoped_refptr(html_source))); |
809 } | 809 } |
OLD | NEW |