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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension_sidebar_defaults.h
===================================================================
--- chrome/common/extensions/extension_sidebar_defaults.h (revision 0)
+++ chrome/common/extensions/extension_sidebar_defaults.h (revision 0)
@@ -0,0 +1,51 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
+#define CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
+#pragma once
+
+#include <string>
+
+#include "base/string16.h"
+#include "googleurl/src/gurl.h"
+
+class SkBitmap;
+
+// ExtensionSidebarDefaults encapsulates the default parameters of a sidebar,
+// as defined in the extension manifest.
+class ExtensionSidebarDefaults {
+ public:
+ ExtensionSidebarDefaults() {}
+ ~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.
+
+ // Default title, stores manifest default_title key value.
+ void set_default_title(const string16& title) {
+ default_title_ = title;
+ }
+ const string16& default_title() const { return default_title_; }
+
+ // Default icon path, stores manifest default_icon key value.
+ void set_default_icon_path(const std::string& path) {
+ default_icon_path_ = path;
+ }
+ 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.
+ return default_icon_path_;
+ }
+
+ // Default sidebar url, resolved and verified against extension permissions.
+ void set_default_url(const GURL& url) {
+ default_url_ = url;
+ }
+ 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.
+ return default_url_;
+ }
+
+ private:
+ string16 default_title_;
+ std::string default_icon_path_;
+ GURL default_url_;
+};
+
+#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_SIDEBAR_DEFAULTS_H_
Property changes on: chrome\common\extensions\extension_sidebar_defaults.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698