OLD | NEW |
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 frame()->Minimize(); | 317 frame()->Minimize(); |
318 } else if (sender == maximize_button_) { | 318 } else if (sender == maximize_button_) { |
319 frame()->Maximize(); | 319 frame()->Maximize(); |
320 } else if (sender == restore_button_) { | 320 } else if (sender == restore_button_) { |
321 frame()->Restore(); | 321 frame()->Restore(); |
322 } else if (sender == close_button_) { | 322 } else if (sender == close_button_) { |
323 frame()->Close(); | 323 frame()->Close(); |
324 } else if (sender == new_avatar_button()) { | 324 } else if (sender == new_avatar_button()) { |
325 BrowserWindow::AvatarBubbleMode mode = | 325 BrowserWindow::AvatarBubbleMode mode = |
326 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; | 326 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; |
327 if (event.IsMouseEvent() && | 327 if ((event.IsMouseEvent() && |
328 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) { | 328 static_cast<const ui::MouseEvent&>(event).IsRightMouseButton()) || |
| 329 (event.type() == ui::ET_GESTURE_LONG_PRESS)) { |
329 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; | 330 mode = BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH; |
330 } | 331 } |
331 browser_view()->ShowAvatarBubbleFromAvatarButton( | 332 browser_view()->ShowAvatarBubbleFromAvatarButton( |
332 mode, | 333 mode, |
333 signin::ManageAccountsParams()); | 334 signin::ManageAccountsParams()); |
334 } | 335 } |
335 } | 336 } |
336 | 337 |
337 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, | 338 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, |
338 const gfx::Point& point) { | 339 const gfx::Point& point) { |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 client_area_bottom + kClientEdgeThickness - client_area_top), | 835 client_area_bottom + kClientEdgeThickness - client_area_top), |
835 toolbar_color); | 836 toolbar_color); |
836 canvas->FillRect(gfx::Rect(client_area_bounds.x(), client_area_bottom, | 837 canvas->FillRect(gfx::Rect(client_area_bounds.x(), client_area_bottom, |
837 client_area_bounds.width(), kClientEdgeThickness), | 838 client_area_bounds.width(), kClientEdgeThickness), |
838 toolbar_color); | 839 toolbar_color); |
839 canvas->FillRect(gfx::Rect(client_area_bounds.right(), client_area_top, | 840 canvas->FillRect(gfx::Rect(client_area_bounds.right(), client_area_top, |
840 kClientEdgeThickness, | 841 kClientEdgeThickness, |
841 client_area_bottom + kClientEdgeThickness - client_area_top), | 842 client_area_bottom + kClientEdgeThickness - client_area_top), |
842 toolbar_color); | 843 toolbar_color); |
843 } | 844 } |
OLD | NEW |