| 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 #ifndef CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 web_app::IconInfoList unprocessed_icons_; | 107 web_app::IconInfoList unprocessed_icons_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(CreateUrlApplicationShortcutView); | 109 DISALLOW_COPY_AND_ASSIGN(CreateUrlApplicationShortcutView); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 // Create an application shortcut pointing to a chrome application. | 112 // Create an application shortcut pointing to a chrome application. |
| 113 class CreateChromeApplicationShortcutView | 113 class CreateChromeApplicationShortcutView |
| 114 : public CreateApplicationShortcutView, | 114 : public CreateApplicationShortcutView, |
| 115 public ImageLoadingTracker::Observer { | 115 public ImageLoadingTracker::Observer { |
| 116 public: | 116 public: |
| 117 explicit CreateChromeApplicationShortcutView(Profile* profile, | 117 CreateChromeApplicationShortcutView(Profile* profile, const Extension* app); |
| 118 const Extension* app); | |
| 119 virtual ~CreateChromeApplicationShortcutView(); | 118 virtual ~CreateChromeApplicationShortcutView(); |
| 120 | 119 |
| 121 // Implement ImageLoadingTracker::Observer. |tracker_| is used to | 120 // Implement ImageLoadingTracker::Observer. |tracker_| is used to |
| 122 // load the app's icon. This method recieves the icon, and adds | 121 // load the app's icon. This method recieves the icon, and adds |
| 123 // it to the "Create Shortcut" dailog box. | 122 // it to the "Create Shortcut" dailog box. |
| 124 virtual void OnImageLoaded(SkBitmap* image, | 123 virtual void OnImageLoaded(SkBitmap* image, |
| 125 const ExtensionResource& resource, | 124 const ExtensionResource& resource, |
| 126 int index); | 125 int index); |
| 127 | 126 |
| 128 private: | 127 private: |
| 129 const Extension* app_; | 128 const Extension* app_; |
| 130 ImageLoadingTracker tracker_; | 129 ImageLoadingTracker tracker_; |
| 131 | 130 |
| 132 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutView); | 131 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutView); |
| 133 }; | 132 }; |
| 134 | 133 |
| 135 | 134 |
| 136 #endif // CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ | 135 #endif // CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ |
| OLD | NEW |