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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.h

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
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 #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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/browser/extensions/image_loading_tracker.h" 13 #include "chrome/browser/extensions/image_loading_tracker.h"
14 #include "chrome/browser/web_applications/web_app.h" 14 #include "chrome/browser/web_applications/web_app.h"
15 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
16 #include "ui/views/window/dialog_delegate.h" 16 #include "ui/views/window/dialog_delegate.h"
17 17
18 class Extension;
19 class Profile; 18 class Profile;
20 class TabContentsWrapper; 19 class TabContentsWrapper;
21 class SkBitmap; 20 class SkBitmap;
22 21
22 namespace extensions {
23 class Extension;
24 }
25
23 namespace views { 26 namespace views {
24 class Checkbox; 27 class Checkbox;
25 class Label; 28 class Label;
26 } 29 }
27 30
28 // CreateShortcutViewCommon implements a dialog that asks user where to create 31 // CreateShortcutViewCommon implements a dialog that asks user where to create
29 // the shortcut for given web app. There are two variants of this dialog: 32 // the shortcut for given web app. There are two variants of this dialog:
30 // Shortcuts that load a URL in an app-like window, and shortcuts that load 33 // Shortcuts that load a URL in an app-like window, and shortcuts that load
31 // a chrome app (the kind you see under "apps" on the new tabs page) in an app 34 // a chrome app (the kind you see under "apps" on the new tabs page) in an app
32 // window. These are implemented as subclasses of CreateShortcutViewCommon. 35 // window. These are implemented as subclasses of CreateShortcutViewCommon.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 web_app::IconInfoList unprocessed_icons_; 106 web_app::IconInfoList unprocessed_icons_;
104 107
105 DISALLOW_COPY_AND_ASSIGN(CreateUrlApplicationShortcutView); 108 DISALLOW_COPY_AND_ASSIGN(CreateUrlApplicationShortcutView);
106 }; 109 };
107 110
108 // Create an application shortcut pointing to a chrome application. 111 // Create an application shortcut pointing to a chrome application.
109 class CreateChromeApplicationShortcutView 112 class CreateChromeApplicationShortcutView
110 : public CreateApplicationShortcutView, 113 : public CreateApplicationShortcutView,
111 public ImageLoadingTracker::Observer { 114 public ImageLoadingTracker::Observer {
112 public: 115 public:
113 CreateChromeApplicationShortcutView(Profile* profile, const Extension* app); 116 CreateChromeApplicationShortcutView(Profile* profile,
117 const extensions::Extension* app);
114 virtual ~CreateChromeApplicationShortcutView(); 118 virtual ~CreateChromeApplicationShortcutView();
115 119
116 // Implement ImageLoadingTracker::Observer. |tracker_| is used to 120 // Implement ImageLoadingTracker::Observer. |tracker_| is used to
117 // 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
118 // it to the "Create Shortcut" dailog box. 122 // it to the "Create Shortcut" dailog box.
119 virtual void OnImageLoaded(const gfx::Image& image, 123 virtual void OnImageLoaded(const gfx::Image& image,
120 const std::string& extension_id, 124 const std::string& extension_id,
121 int index) OVERRIDE; 125 int index) OVERRIDE;
122 126
123 private: 127 private:
124 const Extension* app_; 128 const extensions::Extension* app_;
125 ImageLoadingTracker tracker_; 129 ImageLoadingTracker tracker_;
126 130
127 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutView); 131 DISALLOW_COPY_AND_ASSIGN(CreateChromeApplicationShortcutView);
128 }; 132 };
129 133
130 #endif // CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_ 134 #endif // CHROME_BROWSER_UI_VIEWS_CREATE_APPLICATION_SHORTCUT_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs.h ('k') | chrome/browser/ui/views/create_application_shortcut_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698