| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 const ui::Event& event) { | 300 const ui::Event& event) { |
| 301 if (sender == minimize_button_) { | 301 if (sender == minimize_button_) { |
| 302 frame()->Minimize(); | 302 frame()->Minimize(); |
| 303 } else if (sender == maximize_button_) { | 303 } else if (sender == maximize_button_) { |
| 304 frame()->Maximize(); | 304 frame()->Maximize(); |
| 305 } else if (sender == restore_button_) { | 305 } else if (sender == restore_button_) { |
| 306 frame()->Restore(); | 306 frame()->Restore(); |
| 307 } else if (sender == close_button_) { | 307 } else if (sender == close_button_) { |
| 308 frame()->Close(); | 308 frame()->Close(); |
| 309 } else if (sender == new_avatar_button()) { | 309 } else if (sender == new_avatar_button()) { |
| 310 if (new_avatar_button()->IsMouseReleaseActionSuppressed()) |
| 311 return; |
| 310 browser_view()->ShowAvatarBubbleFromAvatarButton( | 312 browser_view()->ShowAvatarBubbleFromAvatarButton( |
| 311 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, | 313 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, |
| 312 signin::ManageAccountsParams()); | 314 signin::ManageAccountsParams()); |
| 313 } | 315 } |
| 314 } | 316 } |
| 315 | 317 |
| 316 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, | 318 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, |
| 317 const gfx::Point& point) { | 319 const gfx::Point& point) { |
| 318 #if defined(OS_LINUX) | 320 #if defined(OS_LINUX) |
| 319 views::MenuRunner menu_runner(frame()->GetSystemMenuModel(), | 321 views::MenuRunner menu_runner(frame()->GetSystemMenuModel(), |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 | 906 |
| 905 int OpaqueBrowserFrameView::GetTopAreaHeight() const { | 907 int OpaqueBrowserFrameView::GetTopAreaHeight() const { |
| 906 gfx::ImageSkia* frame_image = GetFrameImage(); | 908 gfx::ImageSkia* frame_image = GetFrameImage(); |
| 907 int top_area_height = frame_image->height(); | 909 int top_area_height = frame_image->height(); |
| 908 if (browser_view()->IsTabStripVisible()) { | 910 if (browser_view()->IsTabStripVisible()) { |
| 909 top_area_height = std::max(top_area_height, | 911 top_area_height = std::max(top_area_height, |
| 910 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); | 912 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); |
| 911 } | 913 } |
| 912 return top_area_height; | 914 return top_area_height; |
| 913 } | 915 } |
| OLD | NEW |