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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/prefs/scoped_user_pref_update.h" | |
14 #include "base/time/time.h" | 13 #include "base/time/time.h" |
15 #include "base/values.h" | 14 #include "base/values.h" |
16 #include "chrome/browser/certificate_viewer.h" | 15 #include "chrome/browser/certificate_viewer.h" |
17 #include "chrome/browser/file_select_helper.h" | 16 #include "chrome/browser/file_select_helper.h" |
18 #include "chrome/browser/infobars/infobar_service.h" | 17 #include "chrome/browser/infobars/infobar_service.h" |
19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/sessions/session_tab_helper.h" | 19 #include "chrome/browser/sessions/session_tab_helper.h" |
21 #include "chrome/browser/task_management/web_contents_tags.h" | 20 #include "chrome/browser/task_management/web_contents_tags.h" |
22 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
23 #include "chrome/browser/ui/browser_dialogs.h" | 22 #include "chrome/browser/ui/browser_dialogs.h" |
24 #include "chrome/browser/ui/browser_list.h" | 23 #include "chrome/browser/ui/browser_list.h" |
25 #include "chrome/browser/ui/browser_tabstrip.h" | 24 #include "chrome/browser/ui/browser_tabstrip.h" |
26 #include "chrome/browser/ui/browser_window.h" | 25 #include "chrome/browser/ui/browser_window.h" |
27 #include "chrome/browser/ui/host_desktop.h" | 26 #include "chrome/browser/ui/host_desktop.h" |
28 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 27 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
29 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 28 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
30 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 29 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
31 #include "chrome/browser/ui/webui/devtools_ui.h" | 30 #include "chrome/browser/ui/webui/devtools_ui.h" |
32 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
33 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
34 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
35 #include "components/pref_registry/pref_registry_syncable.h" | 34 #include "components/pref_registry/pref_registry_syncable.h" |
| 35 #include "components/prefs/scoped_user_pref_update.h" |
36 #include "components/syncable_prefs/pref_service_syncable.h" | 36 #include "components/syncable_prefs/pref_service_syncable.h" |
37 #include "components/ui/zoom/page_zoom.h" | 37 #include "components/ui/zoom/page_zoom.h" |
38 #include "components/ui/zoom/zoom_controller.h" | 38 #include "components/ui/zoom/zoom_controller.h" |
39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
40 #include "content/public/browser/devtools_agent_host.h" | 40 #include "content/public/browser/devtools_agent_host.h" |
41 #include "content/public/browser/native_web_keyboard_event.h" | 41 #include "content/public/browser/native_web_keyboard_event.h" |
42 #include "content/public/browser/navigation_controller.h" | 42 #include "content/public/browser/navigation_controller.h" |
43 #include "content/public/browser/navigation_entry.h" | 43 #include "content/public/browser/navigation_entry.h" |
44 #include "content/public/browser/render_frame_host.h" | 44 #include "content/public/browser/render_frame_host.h" |
45 #include "content/public/browser/render_process_host.h" | 45 #include "content/public/browser/render_process_host.h" |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 bool DevToolsWindow::ReloadInspectedWebContents(bool ignore_cache) { | 1281 bool DevToolsWindow::ReloadInspectedWebContents(bool ignore_cache) { |
1282 // Only route reload via front-end if the agent is attached. | 1282 // Only route reload via front-end if the agent is attached. |
1283 WebContents* wc = GetInspectedWebContents(); | 1283 WebContents* wc = GetInspectedWebContents(); |
1284 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) | 1284 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) |
1285 return false; | 1285 return false; |
1286 base::FundamentalValue ignore_cache_value(ignore_cache); | 1286 base::FundamentalValue ignore_cache_value(ignore_cache); |
1287 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", | 1287 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", |
1288 &ignore_cache_value, nullptr, nullptr); | 1288 &ignore_cache_value, nullptr, nullptr); |
1289 return true; | 1289 return true; |
1290 } | 1290 } |
OLD | NEW |