OLD | NEW |
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 #include "content/public/browser/navigation_entry.h" | 159 #include "content/public/browser/navigation_entry.h" |
160 #include "content/public/browser/notification_details.h" | 160 #include "content/public/browser/notification_details.h" |
161 #include "content/public/browser/notification_service.h" | 161 #include "content/public/browser/notification_service.h" |
162 #include "content/public/browser/plugin_service.h" | 162 #include "content/public/browser/plugin_service.h" |
163 #include "content/public/browser/render_process_host.h" | 163 #include "content/public/browser/render_process_host.h" |
164 #include "content/public/browser/render_view_host.h" | 164 #include "content/public/browser/render_view_host.h" |
165 #include "content/public/browser/site_instance.h" | 165 #include "content/public/browser/site_instance.h" |
166 #include "content/public/browser/user_metrics.h" | 166 #include "content/public/browser/user_metrics.h" |
167 #include "content/public/browser/web_contents.h" | 167 #include "content/public/browser/web_contents.h" |
168 #include "content/public/browser/web_contents_view.h" | 168 #include "content/public/browser/web_contents_view.h" |
169 #include "content/public/common/content_restriction.h" | |
170 #include "content/public/common/content_switches.h" | 169 #include "content/public/common/content_switches.h" |
171 #include "content/public/common/page_zoom.h" | 170 #include "content/public/common/page_zoom.h" |
172 #include "content/public/common/renderer_preferences.h" | 171 #include "content/public/common/renderer_preferences.h" |
173 #include "content/public/common/webplugininfo.h" | 172 #include "content/public/common/webplugininfo.h" |
174 #include "extensions/common/constants.h" | 173 #include "extensions/common/constants.h" |
175 #include "grit/chromium_strings.h" | 174 #include "grit/chromium_strings.h" |
176 #include "grit/generated_resources.h" | 175 #include "grit/generated_resources.h" |
177 #include "grit/locale_settings.h" | 176 #include "grit/locale_settings.h" |
178 #include "grit/theme_resources.h" | 177 #include "grit/theme_resources.h" |
179 #include "net/base/net_util.h" | 178 #include "net/base/net_util.h" |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 details.source_frame_id = source_frame_id; | 1535 details.source_frame_id = source_frame_id; |
1537 details.target_url = target_url; | 1536 details.target_url = target_url; |
1538 details.target_web_contents = new_contents; | 1537 details.target_web_contents = new_contents; |
1539 details.not_yet_in_tabstrip = true; | 1538 details.not_yet_in_tabstrip = true; |
1540 content::NotificationService::current()->Notify( | 1539 content::NotificationService::current()->Notify( |
1541 chrome::NOTIFICATION_RETARGETING, | 1540 chrome::NOTIFICATION_RETARGETING, |
1542 content::Source<Profile>(profile_), | 1541 content::Source<Profile>(profile_), |
1543 content::Details<RetargetingDetails>(&details)); | 1542 content::Details<RetargetingDetails>(&details)); |
1544 } | 1543 } |
1545 | 1544 |
1546 void Browser::ContentRestrictionsChanged(WebContents* source) { | |
1547 command_controller_->ContentRestrictionsChanged(); | |
1548 } | |
1549 | |
1550 void Browser::RendererUnresponsive(WebContents* source) { | 1545 void Browser::RendererUnresponsive(WebContents* source) { |
1551 // Ignore hangs if a tab is blocked. | 1546 // Ignore hangs if a tab is blocked. |
1552 int index = tab_strip_model_->GetIndexOfWebContents(source); | 1547 int index = tab_strip_model_->GetIndexOfWebContents(source); |
1553 DCHECK_NE(TabStripModel::kNoTab, index); | 1548 DCHECK_NE(TabStripModel::kNoTab, index); |
1554 if (tab_strip_model_->IsTabBlocked(index)) | 1549 if (tab_strip_model_->IsTabBlocked(index)) |
1555 return; | 1550 return; |
1556 | 1551 |
1557 chrome::ShowHungRendererDialog(source); | 1552 chrome::ShowHungRendererDialog(source); |
1558 } | 1553 } |
1559 | 1554 |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2263 if (contents && !allow_js_access) { | 2258 if (contents && !allow_js_access) { |
2264 contents->web_contents()->GetController().LoadURL( | 2259 contents->web_contents()->GetController().LoadURL( |
2265 target_url, | 2260 target_url, |
2266 content::Referrer(), | 2261 content::Referrer(), |
2267 content::PAGE_TRANSITION_LINK, | 2262 content::PAGE_TRANSITION_LINK, |
2268 std::string()); // No extra headers. | 2263 std::string()); // No extra headers. |
2269 } | 2264 } |
2270 | 2265 |
2271 return contents != NULL; | 2266 return contents != NULL; |
2272 } | 2267 } |
OLD | NEW |