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 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3994 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); | 3994 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); |
3995 #endif | 3995 #endif |
3996 } | 3996 } |
3997 | 3997 |
3998 void Browser::WebIntentDispatch( | 3998 void Browser::WebIntentDispatch( |
3999 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { | 3999 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { |
4000 #if defined(ENABLE_WEB_INTENTS) | 4000 #if defined(ENABLE_WEB_INTENTS) |
4001 if (!web_intents::IsWebIntentsEnabled()) | 4001 if (!web_intents::IsWebIntentsEnabled()) |
4002 return; | 4002 return; |
4003 | 4003 |
4004 UMA_HISTOGRAM_COUNTS("WebIntents.Dispatch", 1); | |
James Hawkins
2012/05/02 20:03:00
Are you familiar with all the other requirements y
Greg Billock
2012/05/02 20:11:54
No. I looked for details, but didn't find them, so
| |
4005 | |
4004 TabContentsWrapper* tcw = | 4006 TabContentsWrapper* tcw = |
4005 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 4007 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
4006 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); | 4008 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); |
4007 tcw->web_intent_picker_controller()->ShowDialog( | 4009 tcw->web_intent_picker_controller()->ShowDialog( |
4008 this, | 4010 this, |
4009 intents_dispatcher->GetIntent().action, | 4011 intents_dispatcher->GetIntent().action, |
4010 intents_dispatcher->GetIntent().type); | 4012 intents_dispatcher->GetIntent().type); |
4011 #endif // defined(ENABLE_WEB_INTENTS) | 4013 #endif // defined(ENABLE_WEB_INTENTS) |
4012 } | 4014 } |
4013 | 4015 |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5505 if (contents && !allow_js_access) { | 5507 if (contents && !allow_js_access) { |
5506 contents->web_contents()->GetController().LoadURL( | 5508 contents->web_contents()->GetController().LoadURL( |
5507 target_url, | 5509 target_url, |
5508 content::Referrer(), | 5510 content::Referrer(), |
5509 content::PAGE_TRANSITION_LINK, | 5511 content::PAGE_TRANSITION_LINK, |
5510 std::string()); // No extra headers. | 5512 std::string()); // No extra headers. |
5511 } | 5513 } |
5512 | 5514 |
5513 return contents != NULL; | 5515 return contents != NULL; |
5514 } | 5516 } |
OLD | NEW |