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

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

Issue 2081103002: Rename PermissionBubbleManager to PermissionRequestManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 5 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "chrome/browser/first_run/first_run.h" 61 #include "chrome/browser/first_run/first_run.h"
62 #include "chrome/browser/history/top_sites_factory.h" 62 #include "chrome/browser/history/top_sites_factory.h"
63 #include "chrome/browser/infobars/infobar_service.h" 63 #include "chrome/browser/infobars/infobar_service.h"
64 #include "chrome/browser/lifetime/application_lifetime.h" 64 #include "chrome/browser/lifetime/application_lifetime.h"
65 #include "chrome/browser/lifetime/keep_alive_registry.h" 65 #include "chrome/browser/lifetime/keep_alive_registry.h"
66 #include "chrome/browser/lifetime/keep_alive_types.h" 66 #include "chrome/browser/lifetime/keep_alive_types.h"
67 #include "chrome/browser/lifetime/scoped_keep_alive.h" 67 #include "chrome/browser/lifetime/scoped_keep_alive.h"
68 #include "chrome/browser/memory/tab_manager_web_contents_data.h" 68 #include "chrome/browser/memory/tab_manager_web_contents_data.h"
69 #include "chrome/browser/notifications/notification_ui_manager.h" 69 #include "chrome/browser/notifications/notification_ui_manager.h"
70 #include "chrome/browser/pepper_broker_infobar_delegate.h" 70 #include "chrome/browser/pepper_broker_infobar_delegate.h"
71 #include "chrome/browser/permissions/permission_request_manager.h"
71 #include "chrome/browser/prefs/incognito_mode_prefs.h" 72 #include "chrome/browser/prefs/incognito_mode_prefs.h"
72 #include "chrome/browser/profiles/profile.h" 73 #include "chrome/browser/profiles/profile.h"
73 #include "chrome/browser/profiles/profile_destroyer.h" 74 #include "chrome/browser/profiles/profile_destroyer.h"
74 #include "chrome/browser/profiles/profile_metrics.h" 75 #include "chrome/browser/profiles/profile_metrics.h"
75 #include "chrome/browser/profiles/profiles_state.h" 76 #include "chrome/browser/profiles/profiles_state.h"
76 #include "chrome/browser/repost_form_warning_controller.h" 77 #include "chrome/browser/repost_form_warning_controller.h"
77 #include "chrome/browser/search/search.h" 78 #include "chrome/browser/search/search.h"
78 #include "chrome/browser/sessions/session_restore.h" 79 #include "chrome/browser/sessions/session_restore.h"
79 #include "chrome/browser/sessions/session_service.h" 80 #include "chrome/browser/sessions/session_service.h"
80 #include "chrome/browser/sessions/session_service_factory.h" 81 #include "chrome/browser/sessions/session_service_factory.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 #include "chrome/browser/ui/tab_dialogs.h" 137 #include "chrome/browser/ui/tab_dialogs.h"
137 #include "chrome/browser/ui/tab_helpers.h" 138 #include "chrome/browser/ui/tab_helpers.h"
138 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 139 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
139 #include "chrome/browser/ui/tabs/tab_menu_model.h" 140 #include "chrome/browser/ui/tabs/tab_menu_model.h"
140 #include "chrome/browser/ui/tabs/tab_strip_model.h" 141 #include "chrome/browser/ui/tabs/tab_strip_model.h"
141 #include "chrome/browser/ui/tabs/tab_strip_model_utils.h" 142 #include "chrome/browser/ui/tabs/tab_strip_model_utils.h"
142 #include "chrome/browser/ui/tabs/tab_utils.h" 143 #include "chrome/browser/ui/tabs/tab_utils.h"
143 #include "chrome/browser/ui/unload_controller.h" 144 #include "chrome/browser/ui/unload_controller.h"
144 #include "chrome/browser/ui/validation_message_bubble.h" 145 #include "chrome/browser/ui/validation_message_bubble.h"
145 #include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h" 146 #include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h"
146 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
147 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 147 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
148 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 148 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
149 #include "chrome/browser/ui/window_sizer/window_sizer.h" 149 #include "chrome/browser/ui/window_sizer/window_sizer.h"
150 #include "chrome/browser/upgrade_detector.h" 150 #include "chrome/browser/upgrade_detector.h"
151 #include "chrome/common/chrome_constants.h" 151 #include "chrome/common/chrome_constants.h"
152 #include "chrome/common/chrome_switches.h" 152 #include "chrome/common/chrome_switches.h"
153 #include "chrome/common/custom_handlers/protocol_handler.h" 153 #include "chrome/common/custom_handlers/protocol_handler.h"
154 #include "chrome/common/pref_names.h" 154 #include "chrome/common/pref_names.h"
155 #include "chrome/common/profiling.h" 155 #include "chrome/common/profiling.h"
156 #include "chrome/common/search/search_types.h" 156 #include "chrome/common/search/search_types.h"
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 return; 1756 return;
1757 } 1757 }
1758 1758
1759 // Make sure content-setting icon is turned off in case the page does 1759 // Make sure content-setting icon is turned off in case the page does
1760 // ungestured and gestured RPH calls. 1760 // ungestured and gestured RPH calls.
1761 if (window_) { 1761 if (window_) {
1762 tab_content_settings->ClearPendingProtocolHandler(); 1762 tab_content_settings->ClearPendingProtocolHandler();
1763 window_->GetLocationBar()->UpdateContentSettingsIcons(); 1763 window_->GetLocationBar()->UpdateContentSettingsIcons();
1764 } 1764 }
1765 1765
1766 PermissionBubbleManager* bubble_manager = 1766 PermissionRequestManager* permission_request_manager =
1767 PermissionBubbleManager::FromWebContents(web_contents); 1767 PermissionRequestManager::FromWebContents(web_contents);
1768 if (bubble_manager) { 1768 if (permission_request_manager) {
1769 bubble_manager->AddRequest( 1769 permission_request_manager->AddRequest(
1770 new RegisterProtocolHandlerPermissionRequest(registry, handler, 1770 new RegisterProtocolHandlerPermissionRequest(registry, handler,
1771 url, user_gesture)); 1771 url, user_gesture));
1772 } 1772 }
1773 } 1773 }
1774 1774
1775 void Browser::UnregisterProtocolHandler(WebContents* web_contents, 1775 void Browser::UnregisterProtocolHandler(WebContents* web_contents,
1776 const std::string& protocol, 1776 const std::string& protocol,
1777 const GURL& url, 1777 const GURL& url,
1778 bool user_gesture) { 1778 bool user_gesture) {
1779 // user_gesture will be used in case we decide to have confirmation bubble 1779 // user_gesture will be used in case we decide to have confirmation bubble
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 if (contents && !allow_js_access) { 2602 if (contents && !allow_js_access) {
2603 contents->web_contents()->GetController().LoadURL( 2603 contents->web_contents()->GetController().LoadURL(
2604 target_url, 2604 target_url,
2605 content::Referrer(), 2605 content::Referrer(),
2606 ui::PAGE_TRANSITION_LINK, 2606 ui::PAGE_TRANSITION_LINK,
2607 std::string()); // No extra headers. 2607 std::string()); // No extra headers.
2608 } 2608 }
2609 2609
2610 return contents != NULL; 2610 return contents != NULL;
2611 } 2611 }
OLDNEW
« no previous file with comments | « chrome/browser/push_messaging/push_messaging_browsertest.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698