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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/frame/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 #if defined(FRAME_AVATAR_BUTTON) 321 #if defined(FRAME_AVATAR_BUTTON)
322 } else if (sender == new_avatar_button()) { 322 } else if (sender == new_avatar_button()) {
323 BrowserWindow::AvatarBubbleMode mode = 323 BrowserWindow::AvatarBubbleMode mode =
324 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; 324 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT;
325 if ((event.IsMouseEvent() && 325 if ((event.IsMouseEvent() &&
326 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) || 326 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) ||
327 (event.type() == ui::ET_GESTURE_LONG_PRESS)) { 327 (event.type() == ui::ET_GESTURE_LONG_PRESS)) {
328 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; 328 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH;
329 } 329 }
330 browser_view()->ShowAvatarBubbleFromAvatarButton( 330 browser_view()->ShowAvatarBubbleFromAvatarButton(
331 mode, 331 mode, signin::ManageAccountsParams(),
332 signin::ManageAccountsParams()); 332 signin_metrics::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN);
333 #endif 333 #endif
334 } 334 }
335 } 335 }
336 336
337 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, 337 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source,
338 const gfx::Point& point) { 338 const gfx::Point& point) {
339 #if defined(OS_LINUX) 339 #if defined(OS_LINUX)
340 views::MenuRunner menu_runner(frame()->GetSystemMenuModel(), 340 views::MenuRunner menu_runner(frame()->GetSystemMenuModel(),
341 views::MenuRunner::HAS_MNEMONICS); 341 views::MenuRunner::HAS_MNEMONICS);
342 ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(), 342 ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(),
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 // images because the images are meant to alpha-blend atop the frame whereas 776 // images because the images are meant to alpha-blend atop the frame whereas
777 // these rects are meant to be fully opaque, without anything overlaid. 777 // these rects are meant to be fully opaque, without anything overlaid.
778 gfx::Rect side(x - kClientEdgeThickness, y, kClientEdgeThickness, 778 gfx::Rect side(x - kClientEdgeThickness, y, kClientEdgeThickness,
779 bottom + kClientEdgeThickness - y); 779 bottom + kClientEdgeThickness - y);
780 canvas->FillRect(side, toolbar_color); 780 canvas->FillRect(side, toolbar_color);
781 canvas->FillRect(gfx::Rect(x, bottom, w, kClientEdgeThickness), 781 canvas->FillRect(gfx::Rect(x, bottom, w, kClientEdgeThickness),
782 toolbar_color); 782 toolbar_color);
783 side.set_x(right); 783 side.set_x(right);
784 canvas->FillRect(side, toolbar_color); 784 canvas->FillRect(side, toolbar_color);
785 } 785 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698