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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/passwords/manage_passwords_bubble_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/user_metrics.h"
8 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
9 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 14 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
14 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" 15 #include "chrome/browser/ui/passwords/password_dialog_prompts.h"
15 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" 16 #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
16 #include "chrome/browser/ui/views/frame/browser_view.h" 17 #include "chrome/browser/ui/views/frame/browser_view.h"
17 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 18 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
18 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 19 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
19 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h" 20 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
20 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h" 21 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
21 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" 22 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h"
22 #include "chrome/grit/generated_resources.h" 23 #include "chrome/grit/generated_resources.h"
23 #include "components/strings/grit/components_strings.h" 24 #include "components/strings/grit/components_strings.h"
24 #include "content/public/browser/user_metrics.h"
25 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/base/material_design/material_design_controller.h" 26 #include "ui/base/material_design/material_design_controller.h"
27 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
28 #include "ui/gfx/color_palette.h" 28 #include "ui/gfx/color_palette.h"
29 #include "ui/gfx/image/image_skia.h" 29 #include "ui/gfx/image/image_skia.h"
30 #include "ui/native_theme/native_theme.h" 30 #include "ui/native_theme/native_theme.h"
31 #include "ui/views/controls/button/blue_button.h" 31 #include "ui/views/controls/button/blue_button.h"
32 #include "ui/views/controls/button/md_text_button.h" 32 #include "ui/views/controls/button/md_text_button.h"
33 #include "ui/views/controls/link.h" 33 #include "ui/views/controls/link.h"
34 #include "ui/views/controls/link_listener.h" 34 #include "ui/views/controls/link_listener.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 this, 567 this,
568 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SIGNIN_PROMO_NO_THANKS)); 568 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SIGNIN_PROMO_NO_THANKS));
569 569
570 // Button row. 570 // Button row.
571 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET); 571 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET);
572 layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET); 572 layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET);
573 layout->AddView(signin_button_); 573 layout->AddView(signin_button_);
574 layout->AddView(no_button_); 574 layout->AddView(no_button_);
575 575
576 parent_->set_initially_focused_view(signin_button_); 576 parent_->set_initially_focused_view(signin_button_);
577 content::RecordAction( 577 base::RecordAction(
578 base::UserMetricsAction("Signin_Impression_FromPasswordBubble")); 578 base::UserMetricsAction("Signin_Impression_FromPasswordBubble"));
579 } 579 }
580 580
581 void ManagePasswordsBubbleView::SignInPromoView::ButtonPressed( 581 void ManagePasswordsBubbleView::SignInPromoView::ButtonPressed(
582 views::Button* sender, 582 views::Button* sender,
583 const ui::Event& event) { 583 const ui::Event& event) {
584 if (sender == signin_button_) 584 if (sender == signin_button_)
585 parent_->model()->OnSignInToChromeClicked(); 585 parent_->model()->OnSignInToChromeClicked();
586 else if (sender == no_button_) 586 else if (sender == no_button_)
587 parent_->model()->OnSkipSignInClicked(); 587 parent_->model()->OnSkipSignInClicked();
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 } else if (model_.state() == 857 } else if (model_.state() ==
858 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { 858 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) {
859 AddChildView(new DesktopIOSPromotionBubbleView( 859 AddChildView(new DesktopIOSPromotionBubbleView(
860 model_.GetProfile(), 860 model_.GetProfile(),
861 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE)); 861 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE));
862 #endif 862 #endif
863 } else { 863 } else {
864 AddChildView(new ManageView(this)); 864 AddChildView(new ManageView(this));
865 } 865 }
866 } 866 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/page_info/page_info_popup_view.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698