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

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

Issue 8771006: views: Move the remaining file from views/ to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 10 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
11 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" 11 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
13 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" 13 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
14 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 14 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
15 #include "chrome/browser/ui/views/window.h" 15 #include "chrome/browser/ui/views/window.h"
16 #include "content/browser/tab_contents/tab_contents.h" 16 #include "content/browser/tab_contents/tab_contents.h"
17 #include "third_party/skia/include/core/SkShader.h" 17 #include "third_party/skia/include/core/SkShader.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/canvas_skia.h" 21 #include "ui/gfx/canvas_skia.h"
22 #include "ui/gfx/skia_util.h" 22 #include "ui/gfx/skia_util.h"
23 #include "views/border.h" 23 #include "ui/views/border.h"
24 24
25 namespace { 25 namespace {
26 // Animation parameters. 26 // Animation parameters.
27 const int kOpenTimeMs = 150; 27 const int kOpenTimeMs = 150;
28 const int kFullOpenedTimeMs = 3200; 28 const int kFullOpenedTimeMs = 3200;
29 const int kMoveTimeMs = kFullOpenedTimeMs + 2 * kOpenTimeMs; 29 const int kMoveTimeMs = kFullOpenedTimeMs + 2 * kOpenTimeMs;
30 const int kFrameRateHz = 60; 30 const int kFrameRateHz = 60;
31 // Colors for the animated box. 31 // Colors for the animated box.
32 const SkColor kTopBoxColor = SkColorSetRGB(0xff, 0xf8, 0xd4); 32 const SkColor kTopBoxColor = SkColorSetRGB(0xff, 0xf8, 0xd4);
33 const SkColor kBottomBoxColor = SkColorSetRGB(0xff, 0xe6, 0xaf); 33 const SkColor kBottomBoxColor = SkColorSetRGB(0xff, 0xe6, 0xaf);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 kAnimatingFraction); 213 kAnimatingFraction);
214 } else if (state > (1.0 - kAnimatingFraction)) { 214 } else if (state > (1.0 - kAnimatingFraction)) {
215 visible_text_size_ = static_cast<int>(text_size_ * (1.0 - state) / 215 visible_text_size_ = static_cast<int>(text_size_ * (1.0 - state) /
216 kAnimatingFraction); 216 kAnimatingFraction);
217 } else { 217 } else {
218 visible_text_size_ = text_size_; 218 visible_text_size_ = text_size_;
219 } 219 }
220 parent_->Layout(); 220 parent_->Layout();
221 parent_->SchedulePaint(); 221 parent_->SchedulePaint();
222 } 222 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698