diff options
4 files changed, 22 insertions, 2 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc index 3686c7d..338c0e2d 100755 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc @@ -26,6 +26,7 @@ #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/gtk/browser_window_gtk.h" +#include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/views/tabs/tab_overview_types.h" #include "chrome/common/x11_util.h" #endif @@ -1605,5 +1606,8 @@ void TabStripGtk::OnTabOverviewButtonClicked(GtkWidget* widget, static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle()); message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget)); TabOverviewTypes::instance()->SendMessage(message); + + UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton", + tabstrip->model_->profile()); } #endif diff --git a/chrome/browser/views/new_browser_window_widget.cc b/chrome/browser/views/new_browser_window_widget.cc index 2eef071..20d29ba 100644 --- a/chrome/browser/views/new_browser_window_widget.cc +++ b/chrome/browser/views/new_browser_window_widget.cc @@ -7,6 +7,7 @@ #include "app/resource_bundle.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_window.h" +#include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profile.h" #include "chrome/browser/views/tabs/tab_overview_types.h" #include "chrome/common/page_transition_types.h" @@ -45,6 +46,9 @@ NewBrowserWindowWidget::~NewBrowserWindowWidget() { } void NewBrowserWindowWidget::ButtonPressed(views::Button* sender) { + UserMetrics::RecordAction(L"TabOverview_PressedCreateNewBrowserButton", + profile_); + Browser* browser = Browser::Create(profile_); browser->AddTabWithURL(GURL(), GURL(), PageTransition::START_PAGE, true, -1, false, NULL); diff --git a/chrome/browser/views/tabs/tab_overview_drag_controller.cc b/chrome/browser/views/tabs/tab_overview_drag_controller.cc index da2df5c..0d622b6 100644 --- a/chrome/browser/views/tabs/tab_overview_drag_controller.cc +++ b/chrome/browser/views/tabs/tab_overview_drag_controller.cc @@ -8,6 +8,7 @@ #include "chrome/browser/browser_window.h" #include "chrome/browser/dock_info.h" #include "chrome/browser/gtk/browser_window_gtk.h" +#include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -93,6 +94,8 @@ void TabOverviewDragController::Drag(const gfx::Point& location) { dragging_ = true; controller_->DragStarted(); grid()->set_floating_index(current_index_); + UserMetrics::RecordAction(L"TabOverview_DragCell", + original_model_->profile()); } if (dragging_) DragCell(location); @@ -107,6 +110,8 @@ void TabOverviewDragController::CommitDrag(const gfx::Point& location) { if (mouse_over_mini_window_) { // Dragged over a mini window, add as the last tab to the browser. Attach(model()->count()); + UserMetrics::RecordAction(L"TabOverview_DropOnMiniWindow", + original_model_->profile()); } else { DropTab(location); } @@ -334,6 +339,9 @@ void TabOverviewDragController::Detach(const gfx::Point& location) { return; } + UserMetrics::RecordAction(L"TabOverview_DetachCell", + original_model_->profile()); + detached_window_ = CreateDetachedWindow( location, model()->GetTabContentsAt(current_index_)); detached_window_->Show(); diff --git a/chrome/browser/views/tabs/tab_overview_message_listener.cc b/chrome/browser/views/tabs/tab_overview_message_listener.cc index 85d6607..a4a77d6 100644 --- a/chrome/browser/views/tabs/tab_overview_message_listener.cc +++ b/chrome/browser/views/tabs/tab_overview_message_listener.cc @@ -7,6 +7,7 @@ #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/gtk/browser_window_gtk.h" +#include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/views/new_browser_window_widget.h" #include "chrome/browser/views/tabs/tab_overview_controller.h" #include "chrome/common/x11_util.h" @@ -82,8 +83,8 @@ void TabOverviewMessageListener::ProcessMessage( if (!over_mini_window) return; - // Not over a mini-window, make sure the controller is showing the - // contents of the browser the mouse is over. + // Over a mini-window, make sure the controller is showing the contents + // of the browser the mouse is over. BrowserWindowGtk* browser_window = BrowserWindowGtk::GetBrowserWindowForNativeWindow( BrowserWindowGtk::GetBrowserWindowForXID(message.param(0))); @@ -97,6 +98,9 @@ void TabOverviewMessageListener::ProcessMessage( select_message.set_type(TabOverviewTypes::Message::WM_MOVE_FLOATING_TAB); select_message.set_param(0, message.param(1)); TabOverviewTypes::instance()->SendMessage(select_message); + + UserMetrics::RecordAction(L"TabOverview_DragOverMiniWindow", + browser_window->browser()->profile()); } default: |