| 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/app_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/app_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" | 7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 private: | 45 private: |
| 46 // views::Border overrides: | 46 // views::Border overrides: |
| 47 virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE { | 47 virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE { |
| 48 canvas->DrawImageInt(border_, 0, view.height() - border_.height()); | 48 canvas->DrawImageInt(border_, 0, view.height() - border_.height()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual gfx::Insets GetInsets() const OVERRIDE { | 51 virtual gfx::Insets GetInsets() const OVERRIDE { |
| 52 return gfx::Insets(0, kShadowSizeX, kShadowSizeBottom, 0); | 52 return gfx::Insets(0, kShadowSizeX, kShadowSizeBottom, 0); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual gfx::Size GetMinimumSize() const OVERRIDE { |
| 56 return border_.size(); |
| 57 } |
| 58 |
| 55 gfx::ImageSkia border_; | 59 gfx::ImageSkia border_; |
| 56 | 60 |
| 57 DISALLOW_COPY_AND_ASSIGN(ControlViewBorder); | 61 DISALLOW_COPY_AND_ASSIGN(ControlViewBorder); |
| 58 }; | 62 }; |
| 59 | 63 |
| 60 // The background for |control_view_|. | 64 // The background for |control_view_|. |
| 61 class ControlViewBackground : public views::Background { | 65 class ControlViewBackground : public views::Background { |
| 62 public: | 66 public: |
| 63 explicit ControlViewBackground(bool is_incognito) { | 67 explicit ControlViewBackground(bool is_incognito) { |
| 64 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 68 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 base::i18n::IsRTL() ? 0 : (width() - preferred.width()), 0, | 231 base::i18n::IsRTL() ? 0 : (width() - preferred.width()), 0, |
| 228 preferred.width(), preferred.height()); | 232 preferred.width(), preferred.height()); |
| 229 } | 233 } |
| 230 | 234 |
| 231 void AppNonClientFrameViewAsh::CloseControlWidget() { | 235 void AppNonClientFrameViewAsh::CloseControlWidget() { |
| 232 if (control_widget_) { | 236 if (control_widget_) { |
| 233 control_widget_->Close(); | 237 control_widget_->Close(); |
| 234 control_widget_ = NULL; | 238 control_widget_ = NULL; |
| 235 } | 239 } |
| 236 } | 240 } |
| OLD | NEW |