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

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

Issue 1724183005: Change ChooserBubbleDelegate class name to ChooserBubbleController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merged changes from master, resolved conflicts and updated related files Created 4 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
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 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #include "chrome/browser/sync/profile_sync_service_factory.h" 80 #include "chrome/browser/sync/profile_sync_service_factory.h"
81 #include "chrome/browser/sync/sync_ui_util.h" 81 #include "chrome/browser/sync/sync_ui_util.h"
82 #include "chrome/browser/tab_contents/retargeting_details.h" 82 #include "chrome/browser/tab_contents/retargeting_details.h"
83 #include "chrome/browser/tab_contents/tab_util.h" 83 #include "chrome/browser/tab_contents/tab_util.h"
84 #include "chrome/browser/task_management/web_contents_tags.h" 84 #include "chrome/browser/task_management/web_contents_tags.h"
85 #include "chrome/browser/themes/theme_service.h" 85 #include "chrome/browser/themes/theme_service.h"
86 #include "chrome/browser/themes/theme_service_factory.h" 86 #include "chrome/browser/themes/theme_service_factory.h"
87 #include "chrome/browser/translate/chrome_translate_client.h" 87 #include "chrome/browser/translate/chrome_translate_client.h"
88 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" 88 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
89 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 89 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
90 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h" 90 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_controller.h"
91 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h" 91 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h"
92 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 92 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
93 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" 93 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
94 #include "chrome/browser/ui/browser_command_controller.h" 94 #include "chrome/browser/ui/browser_command_controller.h"
95 #include "chrome/browser/ui/browser_commands.h" 95 #include "chrome/browser/ui/browser_commands.h"
96 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" 96 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
97 #include "chrome/browser/ui/browser_dialogs.h" 97 #include "chrome/browser/ui/browser_dialogs.h"
98 #include "chrome/browser/ui/browser_finder.h" 98 #include "chrome/browser/ui/browser_finder.h"
99 #include "chrome/browser/ui/browser_instant_controller.h" 99 #include "chrome/browser/ui/browser_instant_controller.h"
100 #include "chrome/browser/ui/browser_list.h" 100 #include "chrome/browser/ui/browser_list.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); 1414 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents);
1415 if (devtools_window) 1415 if (devtools_window)
1416 devtools_window->ShowCertificateViewer(cert_id); 1416 devtools_window->ShowCertificateViewer(cert_id);
1417 } 1417 }
1418 1418
1419 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( 1419 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser(
1420 content::RenderFrameHost* frame, 1420 content::RenderFrameHost* frame,
1421 const content::BluetoothChooser::EventHandler& event_handler) { 1421 const content::BluetoothChooser::EventHandler& event_handler) {
1422 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( 1422 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop(
1423 new BluetoothChooserDesktop(event_handler)); 1423 new BluetoothChooserDesktop(event_handler));
1424 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( 1424 scoped_ptr<BluetoothChooserBubbleController> bubble_controller(
1425 new BluetoothChooserBubbleDelegate(frame)); 1425 new BluetoothChooserBubbleController(frame));
1426 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); 1426 BluetoothChooserBubbleController* bubble_controller_ptr =
1427 bubble_controller.get();
1427 1428
1428 // Wire the ChooserBubbleDelegate to the BluetoothChooser. 1429 // Wire the ChooserBubbleController to the BluetoothChooser.
1429 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate( 1430 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_controller(
1430 bubble_delegate_ptr); 1431 bubble_controller_ptr);
1431 bubble_delegate->set_bluetooth_chooser(bluetooth_chooser_desktop.get()); 1432 bubble_controller->set_bluetooth_chooser(bluetooth_chooser_desktop.get());
1432 1433
1433 Browser* browser = chrome::FindBrowserWithWebContents( 1434 Browser* browser = chrome::FindBrowserWithWebContents(
1434 WebContents::FromRenderFrameHost(frame)); 1435 WebContents::FromRenderFrameHost(frame));
1435 BubbleReference bubble_controller = 1436 BubbleReference bubble_reference =
1436 browser->GetBubbleManager()->ShowBubble(std::move(bubble_delegate)); 1437 browser->GetBubbleManager()->ShowBubble(std::move(bubble_controller));
1437 bubble_delegate_ptr->set_bubble_controller(bubble_controller); 1438 bubble_controller_ptr->set_bubble_reference(bubble_reference);
1438 1439
1439 return std::move(bluetooth_chooser_desktop); 1440 return std::move(bluetooth_chooser_desktop);
1440 } 1441 }
1441 1442
1442 bool Browser::RequestAppBanner(content::WebContents* web_contents) { 1443 bool Browser::RequestAppBanner(content::WebContents* web_contents) {
1443 banners::AppBannerManagerDesktop* manager = 1444 banners::AppBannerManagerDesktop* manager =
1444 banners::AppBannerManagerDesktop::FromWebContents(web_contents); 1445 banners::AppBannerManagerDesktop::FromWebContents(web_contents);
1445 if (manager) { 1446 if (manager) {
1446 manager->RequestAppBanner(web_contents->GetMainFrame(), 1447 manager->RequestAppBanner(web_contents->GetMainFrame(),
1447 web_contents->GetLastCommittedURL(), true); 1448 web_contents->GetLastCommittedURL(), true);
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 if (contents && !allow_js_access) { 2735 if (contents && !allow_js_access) {
2735 contents->web_contents()->GetController().LoadURL( 2736 contents->web_contents()->GetController().LoadURL(
2736 target_url, 2737 target_url,
2737 content::Referrer(), 2738 content::Referrer(),
2738 ui::PAGE_TRANSITION_LINK, 2739 ui::PAGE_TRANSITION_LINK,
2739 std::string()); // No extra headers. 2740 std::string()); // No extra headers.
2740 } 2741 }
2741 2742
2742 return contents != NULL; 2743 return contents != NULL;
2743 } 2744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698