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/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 4165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4176 const string16& action, | 4176 const string16& action, |
4177 const string16& type, | 4177 const string16& type, |
4178 const string16& href, | 4178 const string16& href, |
4179 const string16& title, | 4179 const string16& title, |
4180 const string16& disposition) { | 4180 const string16& disposition) { |
4181 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); | 4181 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); |
4182 } | 4182 } |
4183 | 4183 |
4184 void Browser::WebIntentDispatch( | 4184 void Browser::WebIntentDispatch( |
4185 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { | 4185 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { |
4186 // TODO(yfriedman): remove OS_ANDROID clause when browser is excluded from | |
4187 // Android build. | |
4188 #if !defined(OS_ANDROID) | |
Greg Billock
2012/02/29 00:47:22
Why not just ensure that web_intents::IsWebIntents
Jesse Greenwald
2012/02/29 17:59:41
We're trying to keep our binary size as small as p
| |
4186 if (!web_intents::IsWebIntentsEnabled()) | 4189 if (!web_intents::IsWebIntentsEnabled()) |
4187 return; | 4190 return; |
4188 | 4191 |
4189 TabContentsWrapper* tcw = | 4192 TabContentsWrapper* tcw = |
4190 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 4193 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
4191 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); | 4194 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); |
4192 tcw->web_intent_picker_controller()->ShowDialog( | 4195 tcw->web_intent_picker_controller()->ShowDialog( |
4193 this, | 4196 this, |
4194 intents_dispatcher->GetIntent().action, | 4197 intents_dispatcher->GetIntent().action, |
4195 intents_dispatcher->GetIntent().type); | 4198 intents_dispatcher->GetIntent().type); |
4199 #endif | |
4196 } | 4200 } |
4197 | 4201 |
4198 void Browser::FindReply(WebContents* tab, | 4202 void Browser::FindReply(WebContents* tab, |
4199 int request_id, | 4203 int request_id, |
4200 int number_of_matches, | 4204 int number_of_matches, |
4201 const gfx::Rect& selection_rect, | 4205 const gfx::Rect& selection_rect, |
4202 int active_match_ordinal, | 4206 int active_match_ordinal, |
4203 bool final_update) { | 4207 bool final_update) { |
4204 FindReplyHelper(tab, request_id, number_of_matches, selection_rect, | 4208 FindReplyHelper(tab, request_id, number_of_matches, selection_rect, |
4205 active_match_ordinal, final_update); | 4209 active_match_ordinal, final_update); |
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5608 ShowSingletonTabOverwritingNTP(params); | 5612 ShowSingletonTabOverwritingNTP(params); |
5609 } else { | 5613 } else { |
5610 LoginUIServiceFactory::GetForProfile( | 5614 LoginUIServiceFactory::GetForProfile( |
5611 profile()->GetOriginalProfile())->ShowLoginUI(); | 5615 profile()->GetOriginalProfile())->ShowLoginUI(); |
5612 } | 5616 } |
5613 } | 5617 } |
5614 | 5618 |
5615 void Browser::ToggleSpeechInput() { | 5619 void Browser::ToggleSpeechInput() { |
5616 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5620 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5617 } | 5621 } |
OLD | NEW |