OLD | NEW |
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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #include "chrome/browser/ui/views/toolbar/reload_button.h" | 94 #include "chrome/browser/ui/views/toolbar/reload_button.h" |
95 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 95 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
96 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" | 96 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" |
97 #include "chrome/browser/ui/views/update_recommended_message_box.h" | 97 #include "chrome/browser/ui/views/update_recommended_message_box.h" |
98 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.h" | 98 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.h" |
99 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" | 99 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
100 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 100 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
101 #include "chrome/browser/ui/window_sizer/window_sizer.h" | 101 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
102 #include "chrome/common/chrome_switches.h" | 102 #include "chrome/common/chrome_switches.h" |
103 #include "chrome/common/extensions/command.h" | 103 #include "chrome/common/extensions/command.h" |
| 104 #include "chrome/common/features.h" |
104 #include "chrome/common/pref_names.h" | 105 #include "chrome/common/pref_names.h" |
105 #include "chrome/common/url_constants.h" | 106 #include "chrome/common/url_constants.h" |
106 #include "chrome/grit/chromium_strings.h" | 107 #include "chrome/grit/chromium_strings.h" |
107 #include "chrome/grit/generated_resources.h" | 108 #include "chrome/grit/generated_resources.h" |
108 #include "chrome/grit/locale_settings.h" | 109 #include "chrome/grit/locale_settings.h" |
109 #include "components/app_modal/app_modal_dialog.h" | 110 #include "components/app_modal/app_modal_dialog.h" |
110 #include "components/app_modal/app_modal_dialog_queue.h" | 111 #include "components/app_modal/app_modal_dialog_queue.h" |
111 #include "components/app_modal/native_app_modal_dialog.h" | 112 #include "components/app_modal/native_app_modal_dialog.h" |
112 #include "components/omnibox/browser/omnibox_popup_model.h" | 113 #include "components/omnibox/browser/omnibox_popup_model.h" |
113 #include "components/omnibox/browser/omnibox_popup_view.h" | 114 #include "components/omnibox/browser/omnibox_popup_view.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 #endif | 166 #endif |
166 | 167 |
167 #if defined(OS_WIN) | 168 #if defined(OS_WIN) |
168 #include "base/win/windows_version.h" | 169 #include "base/win/windows_version.h" |
169 #include "chrome/browser/jumplist_win.h" | 170 #include "chrome/browser/jumplist_win.h" |
170 #include "ui/gfx/color_palette.h" | 171 #include "ui/gfx/color_palette.h" |
171 #include "ui/native_theme/native_theme_dark_win.h" | 172 #include "ui/native_theme/native_theme_dark_win.h" |
172 #include "ui/views/win/scoped_fullscreen_visibility.h" | 173 #include "ui/views/win/scoped_fullscreen_visibility.h" |
173 #endif | 174 #endif |
174 | 175 |
175 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 176 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) |
176 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h" | 177 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h" |
177 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h" | 178 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h" |
178 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" | 179 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" |
179 #endif | 180 #endif |
180 | 181 |
181 #if defined(OS_CHROMEOS) | 182 #if defined(OS_CHROMEOS) |
182 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 183 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
183 #endif | 184 #endif |
184 | 185 |
185 #if defined(MOJO_SHELL_CLIENT) | 186 #if defined(MOJO_SHELL_CLIENT) |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 return; | 1331 return; |
1331 | 1332 |
1332 views::View* anchor_view = GetToolbarView()->GetTranslateBubbleAnchor(); | 1333 views::View* anchor_view = GetToolbarView()->GetTranslateBubbleAnchor(); |
1333 views::Widget* bubble_widget = TranslateBubbleView::ShowBubble( | 1334 views::Widget* bubble_widget = TranslateBubbleView::ShowBubble( |
1334 anchor_view, web_contents, step, | 1335 anchor_view, web_contents, step, |
1335 error_type, is_user_gesture ? TranslateBubbleView::USER_GESTURE | 1336 error_type, is_user_gesture ? TranslateBubbleView::USER_GESTURE |
1336 : TranslateBubbleView::AUTOMATIC); | 1337 : TranslateBubbleView::AUTOMATIC); |
1337 GetToolbarView()->OnBubbleCreatedForAnchor(anchor_view, bubble_widget); | 1338 GetToolbarView()->OnBubbleCreatedForAnchor(anchor_view, bubble_widget); |
1338 } | 1339 } |
1339 | 1340 |
1340 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 1341 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) |
1341 void BrowserView::ShowOneClickSigninBubble( | 1342 void BrowserView::ShowOneClickSigninBubble( |
1342 OneClickSigninBubbleType type, | 1343 OneClickSigninBubbleType type, |
1343 const base::string16& email, | 1344 const base::string16& email, |
1344 const base::string16& error_message, | 1345 const base::string16& error_message, |
1345 const StartSyncCallback& start_sync_callback) { | 1346 const StartSyncCallback& start_sync_callback) { |
1346 scoped_ptr<OneClickSigninBubbleDelegate> delegate; | 1347 scoped_ptr<OneClickSigninBubbleDelegate> delegate; |
1347 delegate.reset(new OneClickSigninBubbleLinksDelegate(browser())); | 1348 delegate.reset(new OneClickSigninBubbleLinksDelegate(browser())); |
1348 | 1349 |
1349 views::View* anchor_view = nullptr; | 1350 views::View* anchor_view = nullptr; |
1350 if (type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) | 1351 if (type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 } | 2731 } |
2731 | 2732 |
2732 extensions::ActiveTabPermissionGranter* | 2733 extensions::ActiveTabPermissionGranter* |
2733 BrowserView::GetActiveTabPermissionGranter() { | 2734 BrowserView::GetActiveTabPermissionGranter() { |
2734 content::WebContents* web_contents = GetActiveWebContents(); | 2735 content::WebContents* web_contents = GetActiveWebContents(); |
2735 if (!web_contents) | 2736 if (!web_contents) |
2736 return nullptr; | 2737 return nullptr; |
2737 return extensions::TabHelper::FromWebContents(web_contents) | 2738 return extensions::TabHelper::FromWebContents(web_contents) |
2738 ->active_tab_permission_granter(); | 2739 ->active_tab_permission_granter(); |
2739 } | 2740 } |
OLD | NEW |