OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/devtools/devtools_window.h" | 5 #include "chrome/browser/devtools/devtools_window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 case DevToolsToggleAction::kShowConsolePanel: | 1345 case DevToolsToggleAction::kShowConsolePanel: |
1346 case DevToolsToggleAction::kShow: | 1346 case DevToolsToggleAction::kShow: |
1347 case DevToolsToggleAction::kToggle: | 1347 case DevToolsToggleAction::kToggle: |
1348 // Do nothing. | 1348 // Do nothing. |
1349 break; | 1349 break; |
1350 | 1350 |
1351 case DevToolsToggleAction::kReveal: { | 1351 case DevToolsToggleAction::kReveal: { |
1352 const DevToolsToggleAction::RevealParams* params = | 1352 const DevToolsToggleAction::RevealParams* params = |
1353 action.params(); | 1353 action.params(); |
1354 CHECK(params); | 1354 CHECK(params); |
1355 base::StringValue url_value(params->url); | 1355 base::Value url_value(params->url); |
1356 base::Value line_value(static_cast<int>(params->line_number)); | 1356 base::Value line_value(static_cast<int>(params->line_number)); |
1357 base::Value column_value(static_cast<int>(params->column_number)); | 1357 base::Value column_value(static_cast<int>(params->column_number)); |
1358 bindings_->CallClientFunction("DevToolsAPI.revealSourceLine", | 1358 bindings_->CallClientFunction("DevToolsAPI.revealSourceLine", |
1359 &url_value, &line_value, &column_value); | 1359 &url_value, &line_value, &column_value); |
1360 break; | 1360 break; |
1361 } | 1361 } |
1362 default: | 1362 default: |
1363 NOTREACHED(); | 1363 NOTREACHED(); |
1364 break; | 1364 break; |
1365 } | 1365 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { | 1409 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { |
1410 // Only route reload via front-end if the agent is attached. | 1410 // Only route reload via front-end if the agent is attached. |
1411 WebContents* wc = GetInspectedWebContents(); | 1411 WebContents* wc = GetInspectedWebContents(); |
1412 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) | 1412 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) |
1413 return false; | 1413 return false; |
1414 base::Value bypass_cache_value(bypass_cache); | 1414 base::Value bypass_cache_value(bypass_cache); |
1415 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", | 1415 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", |
1416 &bypass_cache_value, nullptr, nullptr); | 1416 &bypass_cache_value, nullptr, nullptr); |
1417 return true; | 1417 return true; |
1418 } | 1418 } |
OLD | NEW |