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

Side by Side Diff: chrome/browser/dom_ui/bug_report_ui.cc

Issue 4145013: DOMUI: Use ShowSingletonTab to open the settings tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: csilv review fixes. Created 10 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) 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698