| 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 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 return; | 1647 return; |
| 1648 } | 1648 } |
| 1649 | 1649 |
| 1650 web_intents::RecordIntentDispatchRequested(); | 1650 web_intents::RecordIntentDispatchRequested(); |
| 1651 | 1651 |
| 1652 if (!web_contents) { | 1652 if (!web_contents) { |
| 1653 // Intent is system-caused and the picker will show over the currently | 1653 // Intent is system-caused and the picker will show over the currently |
| 1654 // active web contents. | 1654 // active web contents. |
| 1655 web_contents = chrome::GetActiveWebContents(this); | 1655 web_contents = chrome::GetActiveWebContents(this); |
| 1656 } | 1656 } |
| 1657 TabContents* tab_contents = TabContents::FromWebContents(web_contents); | 1657 WebIntentPickerController* web_intent_picker_controller = |
| 1658 tab_contents->web_intent_picker_controller()->SetIntentsDispatcher( | 1658 WebIntentPickerController::FromWebContents(web_contents); |
| 1659 intents_dispatcher); | 1659 web_intent_picker_controller->SetIntentsDispatcher(intents_dispatcher); |
| 1660 tab_contents->web_intent_picker_controller()->ShowDialog( | 1660 web_intent_picker_controller->ShowDialog( |
| 1661 intents_dispatcher->GetIntent().action, | 1661 intents_dispatcher->GetIntent().action, |
| 1662 intents_dispatcher->GetIntent().type); | 1662 intents_dispatcher->GetIntent().type); |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 void Browser::UpdatePreferredSize(WebContents* source, | 1665 void Browser::UpdatePreferredSize(WebContents* source, |
| 1666 const gfx::Size& pref_size) { | 1666 const gfx::Size& pref_size) { |
| 1667 window_->UpdatePreferredSize(source, pref_size); | 1667 window_->UpdatePreferredSize(source, pref_size); |
| 1668 } | 1668 } |
| 1669 | 1669 |
| 1670 void Browser::ResizeDueToAutoResize(WebContents* source, | 1670 void Browser::ResizeDueToAutoResize(WebContents* source, |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 if (contents && !allow_js_access) { | 2291 if (contents && !allow_js_access) { |
| 2292 contents->web_contents()->GetController().LoadURL( | 2292 contents->web_contents()->GetController().LoadURL( |
| 2293 target_url, | 2293 target_url, |
| 2294 content::Referrer(), | 2294 content::Referrer(), |
| 2295 content::PAGE_TRANSITION_LINK, | 2295 content::PAGE_TRANSITION_LINK, |
| 2296 std::string()); // No extra headers. | 2296 std::string()); // No extra headers. |
| 2297 } | 2297 } |
| 2298 | 2298 |
| 2299 return contents != NULL; | 2299 return contents != NULL; |
| 2300 } | 2300 } |
| OLD | NEW |