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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2089933002: Context Menu Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/profiles/profile_chooser_view.h" 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 887
888 views::View* ProfileChooserView::GetInitiallyFocusedView() { 888 views::View* ProfileChooserView::GetInitiallyFocusedView() {
889 return signin_current_profile_link_; 889 return signin_current_profile_link_;
890 } 890 }
891 891
892 int ProfileChooserView::GetDialogButtons() const { 892 int ProfileChooserView::GetDialogButtons() const {
893 return ui::DIALOG_BUTTON_NONE; 893 return ui::DIALOG_BUTTON_NONE;
894 } 894 }
895 895
896 bool ProfileChooserView::HandleContextMenu( 896 bool ProfileChooserView::HandleContextMenu(
897 RenderFrameHost* render_frame_host,
897 const content::ContextMenuParams& params) { 898 const content::ContextMenuParams& params) {
898 // Suppresses the context menu because some features, such as inspecting 899 // Suppresses the context menu because some features, such as inspecting
899 // elements, are not appropriate in a bubble. 900 // elements, are not appropriate in a bubble.
900 return true; 901 return true;
901 } 902 }
902 903
903 void ProfileChooserView::ButtonPressed(views::Button* sender, 904 void ProfileChooserView::ButtonPressed(views::Button* sender,
904 const ui::Event& event) { 905 const ui::Event& event) {
905 if (sender == users_button_) { 906 if (sender == users_button_) {
906 // If this is a guest session, close all the guest browser windows. 907 // If this is a guest session, close all the guest browser windows.
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 1895 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
1895 IncognitoModePrefs::DISABLED; 1896 IncognitoModePrefs::DISABLED;
1896 return incognito_available && !browser_->profile()->IsGuestSession(); 1897 return incognito_available && !browser_->profile()->IsGuestSession();
1897 } 1898 }
1898 1899
1899 void ProfileChooserView::PostActionPerformed( 1900 void ProfileChooserView::PostActionPerformed(
1900 ProfileMetrics::ProfileDesktopMenu action_performed) { 1901 ProfileMetrics::ProfileDesktopMenu action_performed) {
1901 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); 1902 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_);
1902 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; 1903 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE;
1903 } 1904 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698