summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/tabs')
-rw-r--r--chrome/browser/views/tabs/tab_overview_drag_controller.cc8
-rw-r--r--chrome/browser/views/tabs/tab_overview_message_listener.cc8
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: