Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: chrome/browser/ui/views/location_bar/content_setting_image_view.cc

Issue 10834079: views: Extract Widget observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/location_bar/content_setting_image_view.h" 5 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
11 #include "chrome/browser/ui/tab_contents/tab_contents.h" 11 #include "chrome/browser/ui/tab_contents/tab_contents.h"
12 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" 12 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
13 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 13 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 #include "third_party/skia/include/core/SkShader.h" 15 #include "third_party/skia/include/core/SkShader.h"
16 #include "ui/base/animation/slide_animation.h" 16 #include "ui/base/animation/slide_animation.h"
17 #include "ui/base/animation/tween.h" 17 #include "ui/base/animation/tween.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/gfx/canvas.h" 20 #include "ui/gfx/canvas.h"
21 #include "ui/gfx/skia_util.h" 21 #include "ui/gfx/skia_util.h"
22 #include "ui/views/border.h" 22 #include "ui/views/border.h"
23 #include "ui/views/widget/widget.h"
23 24
24 using content::WebContents; 25 using content::WebContents;
25 26
26 namespace { 27 namespace {
27 // Animation parameters. 28 // Animation parameters.
28 const int kOpenTimeMs = 150; 29 const int kOpenTimeMs = 150;
29 const int kFullOpenedTimeMs = 3200; 30 const int kFullOpenedTimeMs = 3200;
30 const int kMoveTimeMs = kFullOpenedTimeMs + 2 * kOpenTimeMs; 31 const int kMoveTimeMs = kFullOpenedTimeMs + 2 * kOpenTimeMs;
31 const int kFrameRateHz = 60; 32 const int kFrameRateHz = 60;
32 // Colors for the animated box. 33 // Colors for the animated box.
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 1.0 - (visible_text_size_ * kAnimatingFraction) / text_size_); 263 1.0 - (visible_text_size_ * kAnimatingFraction) / text_size_);
263 pause_animation_ = false; 264 pause_animation_ = false;
264 slide_animator_->Show(); 265 slide_animator_->Show();
265 } 266 }
266 } 267 }
267 268
268 int ContentSettingImageView::GetBuiltInHorizontalPadding() const { 269 int ContentSettingImageView::GetBuiltInHorizontalPadding() const {
269 return GetBuiltInHorizontalPaddingImpl(); 270 return GetBuiltInHorizontalPaddingImpl();
270 } 271 }
271 272
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698