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/create_application_shortcut_view.h" | 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 const gfx::ImageFamily& icon); | 63 const gfx::ImageFamily& icon); |
64 | 64 |
65 // Updates the title/description of the web app. | 65 // Updates the title/description of the web app. |
66 void UpdateText(const base::string16& title, | 66 void UpdateText(const base::string16& title, |
67 const base::string16& description); | 67 const base::string16& description); |
68 | 68 |
69 // Updates the icon of the web app. | 69 // Updates the icon of the web app. |
70 void UpdateIcon(const gfx::ImageFamily& image); | 70 void UpdateIcon(const gfx::ImageFamily& image); |
71 | 71 |
72 // Overridden from views::View: | 72 // Overridden from views::View: |
73 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 73 virtual void OnPaint(gfx::Canvas* canvas) override; |
74 | 74 |
75 private: | 75 private: |
76 // Initializes the controls | 76 // Initializes the controls |
77 void Init(const base::string16& title, | 77 void Init(const base::string16& title, |
78 const base::string16& description, const gfx::ImageFamily& icon); | 78 const base::string16& description, const gfx::ImageFamily& icon); |
79 | 79 |
80 // Creates or updates description label. | 80 // Creates or updates description label. |
81 void PrepareDescriptionLabel(const base::string16& description); | 81 void PrepareDescriptionLabel(const base::string16& description); |
82 | 82 |
83 // Sets up layout manager. | 83 // Sets up layout manager. |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 close_callback_.Run(false); | 539 close_callback_.Run(false); |
540 return CreateApplicationShortcutView::Cancel(); | 540 return CreateApplicationShortcutView::Cancel(); |
541 } | 541 } |
542 | 542 |
543 void CreateChromeApplicationShortcutView::OnAppInfoLoaded( | 543 void CreateChromeApplicationShortcutView::OnAppInfoLoaded( |
544 const web_app::ShortcutInfo& shortcut_info, | 544 const web_app::ShortcutInfo& shortcut_info, |
545 const extensions::FileHandlersInfo& file_handlers_info) { | 545 const extensions::FileHandlersInfo& file_handlers_info) { |
546 shortcut_info_ = shortcut_info; | 546 shortcut_info_ = shortcut_info; |
547 file_handlers_info_ = file_handlers_info; | 547 file_handlers_info_ = file_handlers_info; |
548 } | 548 } |
OLD | NEW |