| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #include "content/browser/plugin_service.h" | 145 #include "content/browser/plugin_service.h" |
| 146 #include "content/browser/renderer_host/render_view_host.h" | 146 #include "content/browser/renderer_host/render_view_host.h" |
| 147 #include "content/browser/site_instance.h" | 147 #include "content/browser/site_instance.h" |
| 148 #include "content/browser/tab_contents/interstitial_page.h" | 148 #include "content/browser/tab_contents/interstitial_page.h" |
| 149 #include "content/browser/tab_contents/navigation_controller.h" | 149 #include "content/browser/tab_contents/navigation_controller.h" |
| 150 #include "content/browser/tab_contents/navigation_entry.h" | 150 #include "content/browser/tab_contents/navigation_entry.h" |
| 151 #include "content/browser/tab_contents/tab_contents_view.h" | 151 #include "content/browser/tab_contents/tab_contents_view.h" |
| 152 #include "content/browser/user_metrics.h" | 152 #include "content/browser/user_metrics.h" |
| 153 #include "content/public/browser/notification_service.h" | 153 #include "content/public/browser/notification_service.h" |
| 154 #include "content/public/browser/notification_details.h" | 154 #include "content/public/browser/notification_details.h" |
| 155 #include "content/public/browser/intents_host.h" |
| 155 #include "content/public/common/content_restriction.h" | 156 #include "content/public/common/content_restriction.h" |
| 156 #include "content/public/common/content_switches.h" | 157 #include "content/public/common/content_switches.h" |
| 157 #include "content/public/common/page_zoom.h" | 158 #include "content/public/common/page_zoom.h" |
| 158 #include "grit/chromium_strings.h" | 159 #include "grit/chromium_strings.h" |
| 159 #include "grit/generated_resources.h" | 160 #include "grit/generated_resources.h" |
| 160 #include "grit/locale_settings.h" | 161 #include "grit/locale_settings.h" |
| 161 #include "grit/theme_resources_standard.h" | 162 #include "grit/theme_resources_standard.h" |
| 162 #include "net/base/cookie_monster.h" | 163 #include "net/base/cookie_monster.h" |
| 163 #include "net/base/net_util.h" | 164 #include "net/base/net_util.h" |
| 164 #include "net/base/registry_controlled_domain.h" | 165 #include "net/base/registry_controlled_domain.h" |
| (...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3870 void Browser::RegisterIntentHandler(TabContents* tab, | 3871 void Browser::RegisterIntentHandler(TabContents* tab, |
| 3871 const string16& action, | 3872 const string16& action, |
| 3872 const string16& type, | 3873 const string16& type, |
| 3873 const string16& href, | 3874 const string16& href, |
| 3874 const string16& title, | 3875 const string16& title, |
| 3875 const string16& disposition) { | 3876 const string16& disposition) { |
| 3876 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); | 3877 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); |
| 3877 } | 3878 } |
| 3878 | 3879 |
| 3879 void Browser::WebIntentDispatch(TabContents* tab, | 3880 void Browser::WebIntentDispatch(TabContents* tab, |
| 3880 int routing_id, | 3881 content::IntentsHost* intents_host) { |
| 3881 const webkit_glue::WebIntentData& intent, | |
| 3882 int intent_id) { | |
| 3883 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) | 3882 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) |
| 3884 return; | 3883 return; |
| 3885 | 3884 |
| 3886 TabContentsWrapper* tcw = | 3885 TabContentsWrapper* tcw = |
| 3887 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 3886 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
| 3888 tcw->web_intent_picker_controller()->SetIntent(routing_id, | 3887 tcw->web_intent_picker_controller()->SetIntentsHost(intents_host); |
| 3889 intent, | 3888 tcw->web_intent_picker_controller()->ShowDialog( |
| 3890 intent_id); | 3889 this, intents_host->GetIntent().action, intents_host->GetIntent().type); |
| 3891 tcw->web_intent_picker_controller()->ShowDialog(this, | |
| 3892 intent.action, intent.type); | |
| 3893 } | 3890 } |
| 3894 | 3891 |
| 3895 void Browser::FindReply(TabContents* tab, | 3892 void Browser::FindReply(TabContents* tab, |
| 3896 int request_id, | 3893 int request_id, |
| 3897 int number_of_matches, | 3894 int number_of_matches, |
| 3898 const gfx::Rect& selection_rect, | 3895 const gfx::Rect& selection_rect, |
| 3899 int active_match_ordinal, | 3896 int active_match_ordinal, |
| 3900 bool final_update) { | 3897 bool final_update) { |
| 3901 FindReplyHelper(tab, request_id, number_of_matches, selection_rect, | 3898 FindReplyHelper(tab, request_id, number_of_matches, selection_rect, |
| 3902 active_match_ordinal, final_update); | 3899 active_match_ordinal, final_update); |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5314 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5311 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
| 5315 } else { | 5312 } else { |
| 5316 GlobalErrorService* service = | 5313 GlobalErrorService* service = |
| 5317 GlobalErrorServiceFactory::GetForProfile(profile()); | 5314 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5318 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5315 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5319 if (error) { | 5316 if (error) { |
| 5320 error->ShowBubbleView(this); | 5317 error->ShowBubbleView(this); |
| 5321 } | 5318 } |
| 5322 } | 5319 } |
| 5323 } | 5320 } |
| OLD | NEW |