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

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

Issue 2757473002: Cosmetic changes to chrome://net-export, primarily for desktop mode. (Closed)
Patch Set: address Helen's comments Created 3 years, 9 months 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
« no previous file with comments | « no previous file | components/net_log/resources/net_export.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/webui/net_export_ui.h" 5 #include "chrome/browser/ui/webui/net_export_ui.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return true; 326 return true;
327 #else 327 #else
328 return false; 328 return false;
329 #endif 329 #endif
330 } 330 }
331 331
332 void NetExportMessageHandler::NotifyUIWithState( 332 void NetExportMessageHandler::NotifyUIWithState(
333 std::unique_ptr<base::DictionaryValue> state) { 333 std::unique_ptr<base::DictionaryValue> state) {
334 DCHECK_CURRENTLY_ON(BrowserThread::UI); 334 DCHECK_CURRENTLY_ON(BrowserThread::UI);
335 DCHECK(web_ui()); 335 DCHECK(web_ui());
336 state->SetBoolean("useMobileUI", UsingMobileUI());
337 web_ui()->CallJavascriptFunctionUnsafe(net_log::kOnExportNetLogInfoChanged, 336 web_ui()->CallJavascriptFunctionUnsafe(net_log::kOnExportNetLogInfoChanged,
338 *state); 337 *state);
339 } 338 }
340 339
341 void NetExportMessageHandler::ShowSelectFileDialog( 340 void NetExportMessageHandler::ShowSelectFileDialog(
342 const base::FilePath& default_path) { 341 const base::FilePath& default_path) {
343 // User may have clicked more than once before the save dialog appears. 342 // User may have clicked more than once before the save dialog appears.
344 // This prevents creating more than one save dialog. 343 // This prevents creating more than one save dialog.
345 if (select_file_dialog_) 344 if (select_file_dialog_)
346 return; 345 return;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 381
383 } // namespace 382 } // namespace
384 383
385 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { 384 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) {
386 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>()); 385 web_ui->AddMessageHandler(base::MakeUnique<NetExportMessageHandler>());
387 386
388 // Set up the chrome://net-export/ source. 387 // Set up the chrome://net-export/ source.
389 Profile* profile = Profile::FromWebUI(web_ui); 388 Profile* profile = Profile::FromWebUI(web_ui);
390 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); 389 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource());
391 } 390 }
OLDNEW
« no previous file with comments | « no previous file | components/net_log/resources/net_export.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698