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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 } | 371 } |
372 } | 372 } |
373 | 373 |
374 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, | 374 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::View* source, |
375 const gfx::Point& point) { | 375 const gfx::Point& point) { |
376 #if defined(OS_LINUX) | 376 #if defined(OS_LINUX) |
377 views::MenuRunner menu_runner(frame()->GetSystemMenuModel()); | 377 views::MenuRunner menu_runner(frame()->GetSystemMenuModel()); |
378 ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(), | 378 ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(), |
379 window_icon_, | 379 window_icon_, |
380 window_icon_->GetBoundsInScreen(), | 380 window_icon_->GetBoundsInScreen(), |
381 views::MenuItemView::TOPLEFT, | 381 views::MENU_ANCHOR_TOPLEFT, |
382 ui::MENU_SOURCE_MOUSE, | 382 ui::MENU_SOURCE_MOUSE, |
383 views::MenuRunner::HAS_MNEMONICS)); | 383 views::MenuRunner::HAS_MNEMONICS)); |
384 #endif | 384 #endif |
385 } | 385 } |
386 | 386 |
387 /////////////////////////////////////////////////////////////////////////////// | 387 /////////////////////////////////////////////////////////////////////////////// |
388 // OpaqueBrowserFrameView, TabIconView::TabContentsProvider implementation: | 388 // OpaqueBrowserFrameView, TabIconView::TabContentsProvider implementation: |
389 | 389 |
390 bool OpaqueBrowserFrameView::ShouldTabIconViewAnimate() const { | 390 bool OpaqueBrowserFrameView::ShouldTabIconViewAnimate() const { |
391 // This function is queried during the creation of the window as the | 391 // This function is queried during the creation of the window as the |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 | 921 |
922 int OpaqueBrowserFrameView::GetTopAreaHeight() const { | 922 int OpaqueBrowserFrameView::GetTopAreaHeight() const { |
923 gfx::ImageSkia* frame_image = GetFrameImage(); | 923 gfx::ImageSkia* frame_image = GetFrameImage(); |
924 int top_area_height = frame_image->height(); | 924 int top_area_height = frame_image->height(); |
925 if (browser_view()->IsTabStripVisible()) { | 925 if (browser_view()->IsTabStripVisible()) { |
926 top_area_height = std::max(top_area_height, | 926 top_area_height = std::max(top_area_height, |
927 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); | 927 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); |
928 } | 928 } |
929 return top_area_height; | 929 return top_area_height; |
930 } | 930 } |
OLD | NEW |