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

Side by Side Diff: chrome/common/extensions/extension_sidebar_defaults.h

Issue 6321006: Add "sidebar" section to extension manifest:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/string16.h"
12 #include "googleurl/src/gurl.h"
13
14 class SkBitmap;
15
16 // ExtensionSidebarDefaults encapsulates the default parameters of a sidebar,
17 // as defined in the extension manifest.
18 class ExtensionSidebarDefaults {
19 public:
20 ExtensionSidebarDefaults() {}
21 ~ExtensionSidebarDefaults() {}
Aaron Boodman 2011/01/20 00:36:11 Nit: You don't need these, they are implied by the
Aleksey Shlyapnikov 2011/01/20 02:41:43 Done.
22
23 // Default title, stores manifest default_title key value.
24 void set_default_title(const string16& title) {
25 default_title_ = title;
26 }
27 const string16& default_title() const { return default_title_; }
28
29 // Default icon path, stores manifest default_icon key value.
30 void set_default_icon_path(const std::string& path) {
31 default_icon_path_ = path;
32 }
33 std::string default_icon_path() const {
Aaron Boodman 2011/01/20 00:36:11 Return const ref here?
Aleksey Shlyapnikov 2011/01/20 02:41:43 Done.
34 return default_icon_path_;
35 }
36
37 // Default sidebar url, resolved and verified against extension permissions.
38 void set_default_url(const GURL& url) {
39 default_url_ = url;
40 }
41 GURL default_url() const {
Aaron Boodman 2011/01/20 00:36:11 const ref here too
Aleksey Shlyapnikov 2011/01/20 02:41:43 Done.
42 return default_url_;
43 }
44
45 private:
46 string16 default_title_;
47 std::string default_icon_path_;
48 GURL default_url_;
49 };
50
51 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698