OLD | NEW |
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/create_application_shortcut_view.h" | 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "chrome/browser/extensions/extension_tab_helper.h" | 10 #include "chrome/browser/extensions/extension_tab_helper.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 border_rect.fLeft + SkDoubleToScalar(0.5), | 180 border_rect.fLeft + SkDoubleToScalar(0.5), |
181 border_rect.fTop + SkDoubleToScalar(0.5), | 181 border_rect.fTop + SkDoubleToScalar(0.5), |
182 border_rect.fRight - SkDoubleToScalar(0.5), | 182 border_rect.fRight - SkDoubleToScalar(0.5), |
183 border_rect.fBottom - SkDoubleToScalar(0.5), | 183 border_rect.fBottom - SkDoubleToScalar(0.5), |
184 }; | 184 }; |
185 | 185 |
186 SkPaint inner_paint; | 186 SkPaint inner_paint; |
187 inner_paint.setAntiAlias(true); | 187 inner_paint.setAntiAlias(true); |
188 inner_paint.setARGB(0xFF, 0xF8, 0xF8, 0xF8); | 188 inner_paint.setARGB(0xFF, 0xF8, 0xF8, 0xF8); |
189 canvas->AsCanvasSkia()->drawRoundRect( | 189 canvas->AsCanvasSkia()->drawRoundRect( |
190 inner_rect, SkIntToScalar(1.5), SkIntToScalar(1.5), inner_paint); | 190 inner_rect, SkDoubleToScalar(1.5), SkDoubleToScalar(1.5), inner_paint); |
191 } | 191 } |
192 | 192 |
193 } // namespace | 193 } // namespace |
194 | 194 |
195 namespace browser { | 195 namespace browser { |
196 | 196 |
197 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window, | 197 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window, |
198 TabContentsWrapper* tab_contents) { | 198 TabContentsWrapper* tab_contents) { |
199 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), | 199 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), |
200 new CreateUrlApplicationShortcutView(tab_contents))->Show(); | 200 new CreateUrlApplicationShortcutView(tab_contents))->Show(); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 void CreateChromeApplicationShortcutView::OnImageLoaded( | 521 void CreateChromeApplicationShortcutView::OnImageLoaded( |
522 SkBitmap* image, const ExtensionResource& resource, int index) { | 522 SkBitmap* image, const ExtensionResource& resource, int index) { |
523 if (image->isNull()) { | 523 if (image->isNull()) { |
524 NOTREACHED() << "Corrupt image in profile?"; | 524 NOTREACHED() << "Corrupt image in profile?"; |
525 return; | 525 return; |
526 } | 526 } |
527 shortcut_info_.favicon = *image; | 527 shortcut_info_.favicon = *image; |
528 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); | 528 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); |
529 } | 529 } |
530 | 530 |
OLD | NEW |