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

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

Issue 467653002: Revert of [DevTools] Make DevTools clients talk directly to DevToolsAgentHost instead of using DevToolsManage… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 #include "chrome/common/profiling.h" 149 #include "chrome/common/profiling.h"
150 #include "chrome/common/search_types.h" 150 #include "chrome/common/search_types.h"
151 #include "chrome/common/url_constants.h" 151 #include "chrome/common/url_constants.h"
152 #include "components/bookmarks/browser/bookmark_model.h" 152 #include "components/bookmarks/browser/bookmark_model.h"
153 #include "components/bookmarks/browser/bookmark_utils.h" 153 #include "components/bookmarks/browser/bookmark_utils.h"
154 #include "components/google/core/browser/google_url_tracker.h" 154 #include "components/google/core/browser/google_url_tracker.h"
155 #include "components/search/search.h" 155 #include "components/search/search.h"
156 #include "components/startup_metric_utils/startup_metric_utils.h" 156 #include "components/startup_metric_utils/startup_metric_utils.h"
157 #include "components/web_modal/popup_manager.h" 157 #include "components/web_modal/popup_manager.h"
158 #include "components/web_modal/web_contents_modal_dialog_manager.h" 158 #include "components/web_modal/web_contents_modal_dialog_manager.h"
159 #include "content/public/browser/devtools_agent_host.h" 159 #include "content/public/browser/devtools_manager.h"
160 #include "content/public/browser/download_item.h" 160 #include "content/public/browser/download_item.h"
161 #include "content/public/browser/download_manager.h" 161 #include "content/public/browser/download_manager.h"
162 #include "content/public/browser/interstitial_page.h" 162 #include "content/public/browser/interstitial_page.h"
163 #include "content/public/browser/invalidate_type.h" 163 #include "content/public/browser/invalidate_type.h"
164 #include "content/public/browser/navigation_controller.h" 164 #include "content/public/browser/navigation_controller.h"
165 #include "content/public/browser/navigation_entry.h" 165 #include "content/public/browser/navigation_entry.h"
166 #include "content/public/browser/notification_details.h" 166 #include "content/public/browser/notification_details.h"
167 #include "content/public/browser/notification_service.h" 167 #include "content/public/browser/notification_service.h"
168 #include "content/public/browser/plugin_service.h" 168 #include "content/public/browser/plugin_service.h"
169 #include "content/public/browser/render_process_host.h" 169 #include "content/public/browser/render_process_host.h"
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 default: 2021 default:
2022 NOTREACHED() << "Got a notification we didn't register for."; 2022 NOTREACHED() << "Got a notification we didn't register for.";
2023 } 2023 }
2024 } 2024 }
2025 2025
2026 /////////////////////////////////////////////////////////////////////////////// 2026 ///////////////////////////////////////////////////////////////////////////////
2027 // Browser, Command and state updating (private): 2027 // Browser, Command and state updating (private):
2028 2028
2029 void Browser::OnDevToolsDisabledChanged() { 2029 void Browser::OnDevToolsDisabledChanged() {
2030 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled)) 2030 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled))
2031 content::DevToolsAgentHost::DetachAllClients(); 2031 content::DevToolsManager::GetInstance()->CloseAllClientHosts();
2032 } 2032 }
2033 2033
2034 /////////////////////////////////////////////////////////////////////////////// 2034 ///////////////////////////////////////////////////////////////////////////////
2035 // Browser, UI update coalescing and handling (private): 2035 // Browser, UI update coalescing and handling (private):
2036 2036
2037 void Browser::UpdateToolbar(bool should_restore_state) { 2037 void Browser::UpdateToolbar(bool should_restore_state) {
2038 window_->UpdateToolbar(should_restore_state ? 2038 window_->UpdateToolbar(should_restore_state ?
2039 tab_strip_model_->GetActiveWebContents() : NULL); 2039 tab_strip_model_->GetActiveWebContents() : NULL);
2040 } 2040 }
2041 2041
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 if (contents && !allow_js_access) { 2474 if (contents && !allow_js_access) {
2475 contents->web_contents()->GetController().LoadURL( 2475 contents->web_contents()->GetController().LoadURL(
2476 target_url, 2476 target_url,
2477 content::Referrer(), 2477 content::Referrer(),
2478 content::PAGE_TRANSITION_LINK, 2478 content::PAGE_TRANSITION_LINK,
2479 std::string()); // No extra headers. 2479 std::string()); // No extra headers.
2480 } 2480 }
2481 2481
2482 return contents != NULL; 2482 return contents != NULL;
2483 } 2483 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698