diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 22:17:09 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 22:17:09 +0000 |
commit | 5d3d854522bf38df112ca73e3bb6e9c4adb627ae (patch) | |
tree | 61543591fcc3f1276b1c0524534d58014fb4567e /chrome/browser/views/tabs | |
parent | 04d4988300892e4f93649756b966c22785086096 (diff) | |
download | chromium_src-5d3d854522bf38df112ca73e3bb6e9c4adb627ae.zip chromium_src-5d3d854522bf38df112ca73e3bb6e9c4adb627ae.tar.gz chromium_src-5d3d854522bf38df112ca73e3bb6e9c4adb627ae.tar.bz2 |
Adds user metrics for tab overview.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/151172
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19776 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs')
-rw-r--r-- | chrome/browser/views/tabs/tab_overview_drag_controller.cc | 8 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_overview_message_listener.cc | 8 |
2 files changed, 14 insertions, 2 deletions
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: |