Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 12089102: Make most code on mac compile with enable_web_intents=0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ffff Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 1583
1584 void Browser::RegisterProtocolHandler(WebContents* web_contents, 1584 void Browser::RegisterProtocolHandler(WebContents* web_contents,
1585 const std::string& protocol, 1585 const std::string& protocol,
1586 const GURL& url, 1586 const GURL& url,
1587 const string16& title, 1587 const string16& title,
1588 bool user_gesture) { 1588 bool user_gesture) {
1589 RegisterProtocolHandlerHelper( 1589 RegisterProtocolHandlerHelper(
1590 web_contents, protocol, url, title, user_gesture, window()); 1590 web_contents, protocol, url, title, user_gesture, window());
1591 } 1591 }
1592 1592
1593 #if defined(ENABLE_WEB_INTENTS)
1593 void Browser::RegisterIntentHandler( 1594 void Browser::RegisterIntentHandler(
1594 WebContents* web_contents, 1595 WebContents* web_contents,
1595 const webkit_glue::WebIntentServiceData& data, 1596 const webkit_glue::WebIntentServiceData& data,
1596 bool user_gesture) { 1597 bool user_gesture) {
1597 RegisterIntentHandlerInfoBarDelegate::Create(web_contents, data); 1598 RegisterIntentHandlerInfoBarDelegate::Create(web_contents, data);
1598 } 1599 }
1599 1600
1600 void Browser::WebIntentDispatch( 1601 void Browser::WebIntentDispatch(
1601 WebContents* web_contents, 1602 WebContents* web_contents,
1602 content::WebIntentsDispatcher* intents_dispatcher) { 1603 content::WebIntentsDispatcher* intents_dispatcher) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 // active web contents. 1647 // active web contents.
1647 web_contents = tab_strip_model_->GetActiveWebContents(); 1648 web_contents = tab_strip_model_->GetActiveWebContents();
1648 } 1649 }
1649 WebIntentPickerController* web_intent_picker_controller = 1650 WebIntentPickerController* web_intent_picker_controller =
1650 WebIntentPickerController::FromWebContents(web_contents); 1651 WebIntentPickerController::FromWebContents(web_contents);
1651 web_intent_picker_controller->SetIntentsDispatcher(intents_dispatcher); 1652 web_intent_picker_controller->SetIntentsDispatcher(intents_dispatcher);
1652 web_intent_picker_controller->ShowDialog( 1653 web_intent_picker_controller->ShowDialog(
1653 intents_dispatcher->GetIntent().action, 1654 intents_dispatcher->GetIntent().action,
1654 intents_dispatcher->GetIntent().type); 1655 intents_dispatcher->GetIntent().type);
1655 } 1656 }
1657 #endif
1656 1658
1657 void Browser::UpdatePreferredSize(WebContents* source, 1659 void Browser::UpdatePreferredSize(WebContents* source,
1658 const gfx::Size& pref_size) { 1660 const gfx::Size& pref_size) {
1659 window_->UpdatePreferredSize(source, pref_size); 1661 window_->UpdatePreferredSize(source, pref_size);
1660 } 1662 }
1661 1663
1662 void Browser::ResizeDueToAutoResize(WebContents* source, 1664 void Browser::ResizeDueToAutoResize(WebContents* source,
1663 const gfx::Size& new_size) { 1665 const gfx::Size& new_size) {
1664 window_->ResizeDueToAutoResize(source, new_size); 1666 window_->ResizeDueToAutoResize(source, new_size);
1665 } 1667 }
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 if (contents && !allow_js_access) { 2336 if (contents && !allow_js_access) {
2335 contents->web_contents()->GetController().LoadURL( 2337 contents->web_contents()->GetController().LoadURL(
2336 target_url, 2338 target_url,
2337 content::Referrer(), 2339 content::Referrer(),
2338 content::PAGE_TRANSITION_LINK, 2340 content::PAGE_TRANSITION_LINK,
2339 std::string()); // No extra headers. 2341 std::string()); // No extra headers.
2340 } 2342 }
2341 2343
2342 return contents != NULL; 2344 return contents != NULL;
2343 } 2345 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698