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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 win_util::GrabWindowSnapshot(parent->GetNativeWindow(), last_screenshot_png); | 141 win_util::GrabWindowSnapshot(parent->GetNativeWindow(), last_screenshot_png); |
142 #endif | 142 #endif |
143 } | 143 } |
144 | 144 |
145 // Global "display this dialog" function declared in browser_dialogs.h. | 145 // Global "display this dialog" function declared in browser_dialogs.h. |
146 void ShowHtmlBugReportView(views::Window* parent, Browser* browser) { | 146 void ShowHtmlBugReportView(views::Window* parent, Browser* browser) { |
147 std::string bug_report_url = std::string(chrome::kChromeUIBugReportURL) + | 147 std::string bug_report_url = std::string(chrome::kChromeUIBugReportURL) + |
148 "#" + base::IntToString(browser->selected_index()); | 148 "#" + base::IntToString(browser->selected_index()); |
149 | 149 |
150 RefreshLastScreenshot(parent); | 150 RefreshLastScreenshot(parent); |
151 browser->ShowSingletonTab(GURL(bug_report_url)); | 151 browser->ShowSingletonTab(GURL(bug_report_url), false); |
152 } | 152 } |
153 | 153 |
154 } // namespace browser | 154 } // namespace browser |
155 | 155 |
156 | 156 |
157 class BugReportUIHTMLSource : public ChromeURLDataManager::DataSource { | 157 class BugReportUIHTMLSource : public ChromeURLDataManager::DataSource { |
158 public: | 158 public: |
159 explicit BugReportUIHTMLSource(base::StringPiece html); | 159 explicit BugReportUIHTMLSource(base::StringPiece html); |
160 | 160 |
161 // Called when the network layer has requested a resource underneath | 161 // Called when the network layer has requested a resource underneath |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 BugReportUIHTMLSource* html_source = | 705 BugReportUIHTMLSource* html_source = |
706 new BugReportUIHTMLSource(handler->Init()); | 706 new BugReportUIHTMLSource(handler->Init()); |
707 // Set up the chrome://bugreport/ source. | 707 // Set up the chrome://bugreport/ source. |
708 BrowserThread::PostTask( | 708 BrowserThread::PostTask( |
709 BrowserThread::IO, FROM_HERE, | 709 BrowserThread::IO, FROM_HERE, |
710 NewRunnableMethod( | 710 NewRunnableMethod( |
711 Singleton<ChromeURLDataManager>::get(), | 711 Singleton<ChromeURLDataManager>::get(), |
712 &ChromeURLDataManager::AddDataSource, | 712 &ChromeURLDataManager::AddDataSource, |
713 make_scoped_refptr(html_source))); | 713 make_scoped_refptr(html_source))); |
714 } | 714 } |
OLD | NEW |