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

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

Issue 9006027: Rip Out the Sidebar API (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 8 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
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 // ExtensionSidebarDefaults encapsulates the default parameters of a sidebar,
15 // as defined in the extension manifest.
16 class ExtensionSidebarDefaults {
17 public:
18 // Default title, stores manifest default_title key value.
19 void set_default_title(const string16& title) {
20 default_title_ = title;
21 }
22 const string16& default_title() const { return default_title_; }
23
24 // Default icon path, stores manifest default_icon key value.
25 void set_default_icon_path(const std::string& path) {
26 default_icon_path_ = path;
27 }
28 const std::string& default_icon_path() const {
29 return default_icon_path_;
30 }
31
32 // A resolved |url| to extension resource (manifest default_page key value)
33 // to navigate sidebar to by default.
34 void set_default_page(const GURL& url) {
35 default_page_ = url;
36 }
37 const GURL& default_page() const {
38 return default_page_;
39 }
40
41 private:
42 string16 default_title_;
43 std::string default_icon_path_;
44 GURL default_page_;
45 };
46
47 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_manifests_unittest.cc ('k') | chrome/common/extensions/extension_sidebar_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698