| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COMMON_PAGE_ACTION_H_ | 5 #ifndef CHROME_COMMON_PAGE_ACTION_H_ |
| 6 #define CHROME_COMMON_PAGE_ACTION_H_ | 6 #define CHROME_COMMON_PAGE_ACTION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 13 | 13 |
| 14 class PageAction { | 14 class PageAction { |
| 15 public: | 15 public: |
| 16 PageAction(); | 16 PageAction(); |
| 17 virtual ~PageAction(); | 17 virtual ~PageAction(); |
| 18 | 18 |
| 19 typedef enum PageActionType { | 19 typedef enum { |
| 20 PERMANENT = 0, | 20 PERMANENT = 0, |
| 21 TAB = 1, | 21 TAB = 1, |
| 22 }; | 22 } PageActionType; |
| 23 | 23 |
| 24 std::string id() const { return id_; } | 24 std::string id() const { return id_; } |
| 25 void set_id(std::string id) { id_ = id; } | 25 void set_id(std::string id) { id_ = id; } |
| 26 | 26 |
| 27 PageActionType type() const { return type_; } | 27 PageActionType type() const { return type_; } |
| 28 void set_type(PageActionType type) { type_ = type; } | 28 void set_type(PageActionType type) { type_ = type; } |
| 29 | 29 |
| 30 std::string extension_id() const { return extension_id_; } | 30 std::string extension_id() const { return extension_id_; } |
| 31 void set_extension_id(std::string extension_id) { | 31 void set_extension_id(std::string extension_id) { |
| 32 extension_id_ = extension_id; | 32 extension_id_ = extension_id; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // The url of the page which the PageAction is currently active in. | 73 // The url of the page which the PageAction is currently active in. |
| 74 GURL active_url_; | 74 GURL active_url_; |
| 75 | 75 |
| 76 // The tab ID for which the PageAction is currently active in. | 76 // The tab ID for which the PageAction is currently active in. |
| 77 int active_tab_id_; | 77 int active_tab_id_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 typedef std::map<std::string, PageAction*> PageActionMap; | 80 typedef std::map<std::string, PageAction*> PageActionMap; |
| 81 | 81 |
| 82 #endif // CHROME_COMMON_PAGE_ACTION_H_ | 82 #endif // CHROME_COMMON_PAGE_ACTION_H_ |
| OLD | NEW |