OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/fullscreen_exit_bubble.h" | 5 #include "chrome/browser/views/fullscreen_exit_bubble.h" |
6 | 6 |
| 7 #include "app/l10n_util.h" |
| 8 #include "app/l10n_util_win.h" |
7 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
8 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
9 #include "chrome/common/gfx/chrome_canvas.h" | 11 #include "chrome/common/gfx/chrome_canvas.h" |
10 #include "chrome/common/l10n_util.h" | |
11 #include "chrome/common/l10n_util_win.h" | |
12 #include "chrome/views/widget/root_view.h" | 12 #include "chrome/views/widget/root_view.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 | 14 |
15 // FullscreenExitView ---------------------------------------------------------- | 15 // FullscreenExitView ---------------------------------------------------------- |
16 | 16 |
17 class FullscreenExitBubble::FullscreenExitView : public views::View { | 17 class FullscreenExitBubble::FullscreenExitView : public views::View { |
18 public: | 18 public: |
19 FullscreenExitView(FullscreenExitBubble* bubble, | 19 FullscreenExitView(FullscreenExitBubble* bubble, |
20 views::WidgetWin* popup, | 20 views::WidgetWin* popup, |
21 const std::wstring& accelerator); | 21 const std::wstring& accelerator); |
(...skipping 236 matching lines...) Loading... |
258 bool ignore_animation_state) const { | 258 bool ignore_animation_state) const { |
259 gfx::Size size(view_->GetPreferredSize()); | 259 gfx::Size size(view_->GetPreferredSize()); |
260 if (!ignore_animation_state) { | 260 if (!ignore_animation_state) { |
261 size.set_height(static_cast<int>(static_cast<double>(size.height()) * | 261 size.set_height(static_cast<int>(static_cast<double>(size.height()) * |
262 size_animation_->GetCurrentValue())); | 262 size_animation_->GetCurrentValue())); |
263 } | 263 } |
264 gfx::Point origin((root_view_->width() - size.width()) / 2, 0); | 264 gfx::Point origin((root_view_->width() - size.width()) / 2, 0); |
265 views::View::ConvertPointToScreen(root_view_, &origin); | 265 views::View::ConvertPointToScreen(root_view_, &origin); |
266 return gfx::Rect(origin, size); | 266 return gfx::Rect(origin, size); |
267 } | 267 } |
OLD | NEW |