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 3886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3897 const string16& title, | 3897 const string16& title, |
3898 const string16& disposition) { | 3898 const string16& disposition) { |
3899 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); | 3899 RegisterIntentHandlerHelper(tab, action, type, href, title, disposition); |
3900 } | 3900 } |
3901 | 3901 |
3902 void Browser::WebIntentDispatch( | 3902 void Browser::WebIntentDispatch( |
3903 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { | 3903 WebContents* tab, content::WebIntentsDispatcher* intents_dispatcher) { |
3904 if (!web_intents::IsWebIntentsEnabled(profile_)) | 3904 if (!web_intents::IsWebIntentsEnabled(profile_)) |
3905 return; | 3905 return; |
3906 | 3906 |
| 3907 UMA_HISTOGRAM_COUNTS("WebIntents.Dispatch", 1); |
| 3908 |
3907 TabContentsWrapper* tcw = | 3909 TabContentsWrapper* tcw = |
3908 TabContentsWrapper::GetCurrentWrapperForContents(tab); | 3910 TabContentsWrapper::GetCurrentWrapperForContents(tab); |
3909 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); | 3911 tcw->web_intent_picker_controller()->SetIntentsDispatcher(intents_dispatcher); |
3910 tcw->web_intent_picker_controller()->ShowDialog( | 3912 tcw->web_intent_picker_controller()->ShowDialog( |
3911 intents_dispatcher->GetIntent().action, | 3913 intents_dispatcher->GetIntent().action, |
3912 intents_dispatcher->GetIntent().type); | 3914 intents_dispatcher->GetIntent().type); |
3913 } | 3915 } |
3914 | 3916 |
3915 void Browser::UpdatePreferredSize(WebContents* source, | 3917 void Browser::UpdatePreferredSize(WebContents* source, |
3916 const gfx::Size& pref_size) { | 3918 const gfx::Size& pref_size) { |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5398 if (contents && !allow_js_access) { | 5400 if (contents && !allow_js_access) { |
5399 contents->web_contents()->GetController().LoadURL( | 5401 contents->web_contents()->GetController().LoadURL( |
5400 target_url, | 5402 target_url, |
5401 content::Referrer(), | 5403 content::Referrer(), |
5402 content::PAGE_TRANSITION_LINK, | 5404 content::PAGE_TRANSITION_LINK, |
5403 std::string()); // No extra headers. | 5405 std::string()); // No extra headers. |
5404 } | 5406 } |
5405 | 5407 |
5406 return contents != NULL; | 5408 return contents != NULL; |
5407 } | 5409 } |
OLD | NEW |