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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 8 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/toolbar/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
11 #include "base/metrics/user_metrics.h"
11 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
12 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/app/vector_icons/vector_icons.h" 16 #include "chrome/app/vector_icons/vector_icons.h"
16 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/command_updater.h" 18 #include "chrome/browser/command_updater.h"
18 #include "chrome/browser/extensions/extension_util.h" 19 #include "chrome/browser/extensions/extension_util.h"
19 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/themes/theme_properties.h" 21 #include "chrome/browser/themes/theme_properties.h"
(...skipping 28 matching lines...) Expand all
49 #include "chrome/common/pref_names.h" 50 #include "chrome/common/pref_names.h"
50 #include "chrome/grit/chromium_strings.h" 51 #include "chrome/grit/chromium_strings.h"
51 #include "chrome/grit/generated_resources.h" 52 #include "chrome/grit/generated_resources.h"
52 #include "chrome/grit/theme_resources.h" 53 #include "chrome/grit/theme_resources.h"
53 #include "components/omnibox/browser/omnibox_view.h" 54 #include "components/omnibox/browser/omnibox_view.h"
54 #include "components/prefs/pref_service.h" 55 #include "components/prefs/pref_service.h"
55 #include "components/strings/grit/components_strings.h" 56 #include "components/strings/grit/components_strings.h"
56 #include "content/public/browser/browser_accessibility_state.h" 57 #include "content/public/browser/browser_accessibility_state.h"
57 #include "content/public/browser/notification_service.h" 58 #include "content/public/browser/notification_service.h"
58 #include "content/public/browser/render_view_host.h" 59 #include "content/public/browser/render_view_host.h"
59 #include "content/public/browser/user_metrics.h"
60 #include "content/public/browser/web_contents.h" 60 #include "content/public/browser/web_contents.h"
61 #include "ui/accessibility/ax_node_data.h" 61 #include "ui/accessibility/ax_node_data.h"
62 #include "ui/base/l10n/l10n_util.h" 62 #include "ui/base/l10n/l10n_util.h"
63 #include "ui/base/material_design/material_design_controller.h" 63 #include "ui/base/material_design/material_design_controller.h"
64 #include "ui/base/theme_provider.h" 64 #include "ui/base/theme_provider.h"
65 #include "ui/base/window_open_disposition.h" 65 #include "ui/base/window_open_disposition.h"
66 #include "ui/compositor/layer.h" 66 #include "ui/compositor/layer.h"
67 #include "ui/gfx/canvas.h" 67 #include "ui/gfx/canvas.h"
68 #include "ui/gfx/image/canvas_image_source.h" 68 #include "ui/gfx/image/canvas_image_source.h"
69 #include "ui/gfx/paint_vector_icon.h" 69 #include "ui/gfx/paint_vector_icon.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 // Keep track of whether we were showing the incompatibility icon before, 675 // Keep track of whether we were showing the incompatibility icon before,
676 // so we don't send multiple UMA events for example when multiple Chrome 676 // so we don't send multiple UMA events for example when multiple Chrome
677 // windows are open. 677 // windows are open.
678 static bool incompatibility_warning_showing = false; 678 static bool incompatibility_warning_showing = false;
679 // Save the old value before resetting it. 679 // Save the old value before resetting it.
680 bool was_showing = incompatibility_warning_showing; 680 bool was_showing = incompatibility_warning_showing;
681 incompatibility_warning_showing = false; 681 incompatibility_warning_showing = false;
682 682
683 if (type == AppMenuIconController::IconType::INCOMPATIBILITY_WARNING) { 683 if (type == AppMenuIconController::IconType::INCOMPATIBILITY_WARNING) {
684 if (!was_showing) { 684 if (!was_showing) {
685 content::RecordAction(UserMetricsAction("ConflictBadge")); 685 base::RecordAction(UserMetricsAction("ConflictBadge"));
686 #if defined(OS_WIN) 686 #if defined(OS_WIN)
687 ConflictingModuleView::MaybeShow(browser_, app_menu_button_); 687 ConflictingModuleView::MaybeShow(browser_, app_menu_button_);
688 #endif 688 #endif
689 } 689 }
690 incompatibility_warning_showing = true; 690 incompatibility_warning_showing = true;
691 return; 691 return;
692 } 692 }
693 } 693 }
694 694
695 gfx::Size ToolbarView::GetSizeInternal( 695 gfx::Size ToolbarView::GetSizeInternal(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 if (OutdatedUpgradeBubbleView::IsAvailable()) { 769 if (OutdatedUpgradeBubbleView::IsAvailable()) {
770 OutdatedUpgradeBubbleView::ShowBubble(app_menu_button_, browser_, 770 OutdatedUpgradeBubbleView::ShowBubble(app_menu_button_, browser_,
771 auto_update_enabled); 771 auto_update_enabled);
772 } 772 }
773 } 773 }
774 774
775 void ToolbarView::OnShowHomeButtonChanged() { 775 void ToolbarView::OnShowHomeButtonChanged() {
776 Layout(); 776 Layout();
777 SchedulePaint(); 777 SchedulePaint();
778 } 778 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | chrome/browser/ui/webui/app_launcher_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698