| 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 "build/build_config.h" |    7 #include "build/build_config.h" | 
|    8 #include "chrome/browser/themes/theme_properties.h" |    8 #include "chrome/browser/themes/theme_properties.h" | 
|    9 #include "chrome/browser/themes/theme_service_factory.h" |    9 #include "chrome/browser/themes/theme_service_factory.h" | 
|   10 #include "chrome/browser/ui/layout_constants.h" |   10 #include "chrome/browser/ui/layout_constants.h" | 
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  288     frame()->Close(); |  288     frame()->Close(); | 
|  289   } |  289   } | 
|  290 } |  290 } | 
|  291  |  291  | 
|  292 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::MenuButton* source, |  292 void OpaqueBrowserFrameView::OnMenuButtonClicked(views::MenuButton* source, | 
|  293                                                  const gfx::Point& point, |  293                                                  const gfx::Point& point, | 
|  294                                                  const ui::Event* event) { |  294                                                  const ui::Event* event) { | 
|  295 #if defined(OS_LINUX) |  295 #if defined(OS_LINUX) | 
|  296   views::MenuRunner menu_runner(frame()->GetSystemMenuModel(), |  296   views::MenuRunner menu_runner(frame()->GetSystemMenuModel(), | 
|  297                                 views::MenuRunner::HAS_MNEMONICS); |  297                                 views::MenuRunner::HAS_MNEMONICS); | 
|  298   ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(), |  298   menu_runner.RunMenuAt(browser_view()->GetWidget(), window_icon_, | 
|  299                                       window_icon_, |  299                         window_icon_->GetBoundsInScreen(), | 
|  300                                       window_icon_->GetBoundsInScreen(), |  300                         views::MENU_ANCHOR_TOPLEFT, ui::MENU_SOURCE_MOUSE); | 
|  301                                       views::MENU_ANCHOR_TOPLEFT, |  | 
|  302                                       ui::MENU_SOURCE_MOUSE)); |  | 
|  303 #endif |  301 #endif | 
|  304 } |  302 } | 
|  305  |  303  | 
|  306 /////////////////////////////////////////////////////////////////////////////// |  304 /////////////////////////////////////////////////////////////////////////////// | 
|  307 // OpaqueBrowserFrameView, TabIconView::TabContentsProvider implementation: |  305 // OpaqueBrowserFrameView, TabIconView::TabContentsProvider implementation: | 
|  308  |  306  | 
|  309 bool OpaqueBrowserFrameView::ShouldTabIconViewAnimate() const { |  307 bool OpaqueBrowserFrameView::ShouldTabIconViewAnimate() const { | 
|  310   // This function is queried during the creation of the window as the |  308   // This function is queried during the creation of the window as the | 
|  311   // TabIconView we host is initialized, so we need to null check the selected |  309   // TabIconView we host is initialized, so we need to null check the selected | 
|  312   // WebContents because in this condition there is not yet a selected tab. |  310   // WebContents because in this condition there is not yet a selected tab. | 
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  665   gfx::Rect side(x, y, kClientEdgeThickness, h); |  663   gfx::Rect side(x, y, kClientEdgeThickness, h); | 
|  666   canvas->FillRect(side, color); |  664   canvas->FillRect(side, color); | 
|  667   if (draw_bottom) { |  665   if (draw_bottom) { | 
|  668     canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), |  666     canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), | 
|  669                                kClientEdgeThickness), |  667                                kClientEdgeThickness), | 
|  670                      color); |  668                      color); | 
|  671   } |  669   } | 
|  672   side.Offset(w + kClientEdgeThickness, 0); |  670   side.Offset(w + kClientEdgeThickness, 0); | 
|  673   canvas->FillRect(side, color); |  671   canvas->FillRect(side, color); | 
|  674 } |  672 } | 
| OLD | NEW |