| Index: generated_files_will_not_submit/tabs.h
|
| diff --git a/generated_files_will_not_submit/tabs.h b/generated_files_will_not_submit/tabs.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b411a55029918351d2c56c40130e2676dea4a477
|
| --- /dev/null
|
| +++ b/generated_files_will_not_submit/tabs.h
|
| @@ -0,0 +1,706 @@
|
| +// Copyright (c) 2012 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.
|
| +
|
| +// GENERATED FROM THE API DEFINITION IN
|
| +// chrome/common/extensions/api/tabs.json
|
| +// DO NOT EDIT.
|
| +
|
| +#ifndef CHROME_COMMON_EXTENSIONS_API_TABS_H__
|
| +#define CHROME_COMMON_EXTENSIONS_API_TABS_H__
|
| +#pragma once
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/linked_ptr.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/values.h"
|
| +
|
| +namespace extensions {
|
| +namespace api {
|
| +
|
| +namespace windows {
|
| +struct Window;
|
| +}
|
| +
|
| +namespace tabs {
|
| +
|
| +//
|
| +// Types
|
| +//
|
| +
|
| +struct Tab {
|
| + ~Tab();
|
| + Tab();
|
| +
|
| + // Either <em>loading</em> or <em>complete</em>.
|
| + scoped_ptr<std::string> status;
|
| +
|
| + // The zero-based index of the tab within its window.
|
| + int index;
|
| +
|
| + // The ID of the tab that opened this tab, if any. This will only be present if
|
| + // the opener tab still exists.
|
| + scoped_ptr<int> opener_tab_id;
|
| +
|
| + // Whether the tab is pinned.
|
| + bool pinned;
|
| +
|
| + // The title of the tab. This may not be available if the tab is loading.
|
| + scoped_ptr<std::string> title;
|
| +
|
| + // The URL the tab is displaying.
|
| + std::string url;
|
| +
|
| + // Whether the tab is selected.
|
| + bool selected;
|
| +
|
| + // Whether the tab is highlighted.
|
| + bool highlighted;
|
| +
|
| + // The ID of the window the tab is contained within.
|
| + int window_id;
|
| +
|
| + // Whether the tab is active in its window.
|
| + bool active;
|
| +
|
| + // The URL of the tab's favicon. This may not be available if the tab is
|
| + // loading.
|
| + scoped_ptr<std::string> fav_icon_url;
|
| +
|
| + // The ID of the tab. Tab IDs are unique within a browser session.
|
| + int id;
|
| +
|
| + // Whether the tab is in an incognito window.
|
| + bool incognito;
|
| +
|
| + // Populates a Tab object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, Tab* out);
|
| +
|
| + // Returns a new DictionaryValue representing the serialized form of this
|
| + // Tab object. Passes ownership to caller.
|
| + scoped_ptr<DictionaryValue> ToValue() const;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Tab);
|
| +};
|
| +
|
| +//
|
| +// Functions
|
| +//
|
| +
|
| +namespace ExecuteScript {
|
| + struct Params {
|
| + // Details of the script to run. Either the code or the file property must be
|
| + // set, but both may not be set at the same time.
|
| + struct Details {
|
| + ~Details();
|
| + Details();
|
| +
|
| + // If allFrames is true, this function injects script into all frames of
|
| + // current page. By default, it's false and script is injected only into the
|
| + // top main frame.
|
| + scoped_ptr<bool> all_frames;
|
| +
|
| + // JavaScript code to execute.
|
| + scoped_ptr<std::string> code;
|
| +
|
| + // JavaScript file to execute.
|
| + scoped_ptr<std::string> file;
|
| +
|
| + // Populates a Details object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, Details* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Details);
|
| + };
|
| +
|
| + // The ID of the tab in which to run the script; defaults to the active tab of
|
| + // the current window.
|
| + scoped_ptr<int> tab_id;
|
| +
|
| + // Details of the script to run. Either the code or the file property must be
|
| + // set, but both may not be set at the same time.
|
| + Details details;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create();
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Get {
|
| + struct Params {
|
| + int tab_id;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create(const Tab& tab);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace GetCurrent {
|
| +
|
| + namespace Result {
|
| + Value* Create(const Tab& tab);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Create {
|
| + struct Params {
|
| + struct CreateProperties {
|
| + ~CreateProperties();
|
| + CreateProperties();
|
| +
|
| + // The position the tab should take in the window. The provided value will be
|
| + // clamped to between zero and the number of tabs in the window.
|
| + scoped_ptr<int> index;
|
| +
|
| + // The ID of the tab that opened this tab. If specified, the opener tab must be
|
| + // in the same window as the newly created tab.
|
| + scoped_ptr<int> opener_tab_id;
|
| +
|
| + // The URL to navigate the tab to initially. Fully-qualified URLs must include
|
| + // a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs
|
| + // will be relative to the current page within the extension. Defaults to the
|
| + // New Tab Page.
|
| + scoped_ptr<std::string> url;
|
| +
|
| + // Whether the tab should become the selected tab in the window. Defaults to
|
| + // <var>true</var>
|
| + scoped_ptr<bool> selected;
|
| +
|
| + // Whether the tab should be pinned. Defaults to <var>false</var>
|
| + scoped_ptr<bool> pinned;
|
| +
|
| + // The window to create the new tab in. Defaults to the <a
|
| + // href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> window_id;
|
| +
|
| + // Whether the tab should become the active tab in the window. Defaults to
|
| + // <var>true</var>
|
| + scoped_ptr<bool> active;
|
| +
|
| + // Populates a CreateProperties object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, CreateProperties* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(CreateProperties);
|
| + };
|
| +
|
| + CreateProperties create_properties;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // Details about the created tab. Will contain the ID of the new tab.
|
| + Value* Create(const Tab& tab);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Move {
|
| + struct Params {
|
| + struct MoveProperties {
|
| + ~MoveProperties();
|
| + MoveProperties();
|
| +
|
| + // The position to move the window to. The provided value will be clamped to
|
| + // between zero and the number of tabs in the window.
|
| + int index;
|
| +
|
| + // Defaults to the window the tab is currently in.
|
| + scoped_ptr<int> window_id;
|
| +
|
| + // Populates a MoveProperties object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, MoveProperties* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(MoveProperties);
|
| + };
|
| +
|
| + scoped_ptr<int> tab_ids_integer;
|
| +
|
| + scoped_ptr<std::vector<int> > tab_ids_array;
|
| +
|
| + MoveProperties move_properties;
|
| +
|
| + enum TabIdsType {
|
| + TAB_IDS_NONE,
|
| + TAB_IDS_INTEGER,
|
| + TAB_IDS_ARRAY,
|
| + };
|
| +
|
| + TabIdsType tab_ids_type;
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create(const Tab& tabs_ref);
|
| + Value* Create(const std::vector<linked_ptr<Tab> >& tabs_array);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Update {
|
| + struct Params {
|
| + struct UpdateProperties {
|
| + ~UpdateProperties();
|
| + UpdateProperties();
|
| +
|
| + // Adds or removes the tab from the current selection.
|
| + scoped_ptr<bool> highlighted;
|
| +
|
| + // The ID of the tab that opened this tab. If specified, the opener tab must be
|
| + // in the same window as this tab.
|
| + scoped_ptr<int> opener_tab_id;
|
| +
|
| + // A URL to navigate the tab to.
|
| + scoped_ptr<std::string> url;
|
| +
|
| + // Whether the tab should be selected.
|
| + scoped_ptr<bool> selected;
|
| +
|
| + // Whether the tab should be pinned.
|
| + scoped_ptr<bool> pinned;
|
| +
|
| + // Whether the tab should be active.
|
| + scoped_ptr<bool> active;
|
| +
|
| + // Populates a UpdateProperties object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, UpdateProperties* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(UpdateProperties);
|
| + };
|
| +
|
| + // Defaults to the selected tab of the <a
|
| + // href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> tab_id;
|
| +
|
| + UpdateProperties update_properties;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // Details about the updated tab, or <code>null</code> if the 'tabs'
|
| + // permission has not been requested.
|
| + Value* Create(const Tab& tab);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Remove {
|
| + struct Params {
|
| + scoped_ptr<int> tab_ids_integer;
|
| +
|
| + scoped_ptr<std::vector<int> > tab_ids_array;
|
| +
|
| + enum TabIdsType {
|
| + TAB_IDS_NONE,
|
| + TAB_IDS_INTEGER,
|
| + TAB_IDS_ARRAY,
|
| + };
|
| +
|
| + TabIdsType tab_ids_type;
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create();
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace CaptureVisibleTab {
|
| + struct Params {
|
| + // Set parameters of image capture, such as the format of the resulting image.
|
| + struct Options {
|
| + ~Options();
|
| + Options();
|
| +
|
| + // When format is 'jpeg', controls the quality of the resulting image. This
|
| + // value is ignored for PNG images. As quality is decreased, the resulting
|
| + // image will have more visual artifacts, and the number of bytes needed to
|
| + // store it will decrease.
|
| + scoped_ptr<int> quality;
|
| +
|
| + // The format of the resulting image. Default is jpeg.
|
| + scoped_ptr<std::string> format;
|
| +
|
| + // Populates a Options object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, Options* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Options);
|
| + };
|
| +
|
| + // The target window. Defaults to the <a
|
| + // href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> window_id;
|
| +
|
| + // Set parameters of image capture, such as the format of the resulting image.
|
| + scoped_ptr<Options> options;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // A data URL which encodes an image of the visible area of the captured tab.
|
| + // May be assigned to the 'src' property of an HTML Image element for
|
| + // display.
|
| + Value* Create(const std::string data_url);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Reload {
|
| + struct Params {
|
| + struct ReloadProperties {
|
| + ~ReloadProperties();
|
| + ReloadProperties();
|
| +
|
| + // Whether using any local cache. Default is false.
|
| + scoped_ptr<bool> bypass_cache;
|
| +
|
| + // Populates a ReloadProperties object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, ReloadProperties* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(ReloadProperties);
|
| + };
|
| +
|
| + // The ID of the tab to reload; defaults to the selected tab of the current
|
| + // window.
|
| + scoped_ptr<int> tab_id;
|
| +
|
| + scoped_ptr<ReloadProperties> reload_properties;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create();
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace DetectLanguage {
|
| + struct Params {
|
| + // Defaults to the active tab of the <a
|
| + // href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> tab_id;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // An ISO language code such as <code>en</code> or <code>fr</code>. For a
|
| + // complete list of languages supported by this method, see <a
|
| + // href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/langu
|
| + // ages/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns
|
| + // will be checked and the first non-NULL value will be returned except for
|
| + // Simplified Chinese for which zh-CN will be returned. For an unknown
|
| + // language, <code>und</code> will be returned.
|
| + Value* Create(const std::string language);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace InsertCSS {
|
| + struct Params {
|
| + // Details of the CSS text to insert. Either the code or the file property must
|
| + // be set, but both may not be set at the same time.
|
| + struct Details {
|
| + ~Details();
|
| + Details();
|
| +
|
| + // If allFrames is true, this function injects CSS text into all frames of
|
| + // current page. By default, it's false and CSS is injected only into the top
|
| + // main frame.
|
| + scoped_ptr<bool> all_frames;
|
| +
|
| + // CSS code to be injected.
|
| + scoped_ptr<std::string> code;
|
| +
|
| + // CSS file to be injected.
|
| + scoped_ptr<std::string> file;
|
| +
|
| + // Populates a Details object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, Details* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Details);
|
| + };
|
| +
|
| + // The ID of the tab in which to insert the CSS; defaults to the active tab of
|
| + // the current window.
|
| + scoped_ptr<int> tab_id;
|
| +
|
| + // Details of the CSS text to insert. Either the code or the file property must
|
| + // be set, but both may not be set at the same time.
|
| + Details details;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create();
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Highlight {
|
| + struct Params {
|
| + struct HighlightInfo {
|
| + ~HighlightInfo();
|
| + HighlightInfo();
|
| +
|
| + scoped_ptr<std::vector<int> > tabs_array;
|
| +
|
| + scoped_ptr<int> tabs_integer;
|
| +
|
| + // The window that contains the tabs.
|
| + int window_id;
|
| +
|
| + enum TabsType {
|
| + TABS_NONE,
|
| + TABS_ARRAY,
|
| + TABS_INTEGER,
|
| + };
|
| +
|
| + TabsType tabs_type;
|
| + // Populates a HighlightInfo object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, HighlightInfo* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(HighlightInfo);
|
| + };
|
| +
|
| + HighlightInfo highlight_info;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // Contains details about the window whose tabs were highlighted.
|
| + Value* Create(const windows::Window& window);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace Query {
|
| + struct Params {
|
| + struct QueryInfo {
|
| + ~QueryInfo();
|
| + QueryInfo();
|
| +
|
| + // Whether the tabs have completed loading.
|
| + scoped_ptr<std::string> status;
|
| +
|
| + // Whether the tabs are pinned.
|
| + scoped_ptr<bool> pinned;
|
| +
|
| + // The position of the tabs within their windows.
|
| + scoped_ptr<int> index;
|
| +
|
| + // Match tabs against a URL pattern.
|
| + scoped_ptr<std::string> url;
|
| +
|
| + // Match page titles against a pattern.
|
| + scoped_ptr<std::string> title;
|
| +
|
| + // Whether the tabs are highlighted.
|
| + scoped_ptr<bool> highlighted;
|
| +
|
| + // The ID of the parent window, or <a
|
| + // href='windows.html#property-WINDOW_ID_CURRENT'>chrome.windows.WINDOW_ID_CURRE
|
| + // NT</a> for the <a href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> window_id;
|
| +
|
| + // The type of window the tabs are in.
|
| + scoped_ptr<std::string> window_type;
|
| +
|
| + // Whether the tabs are active in their windows.
|
| + scoped_ptr<bool> active;
|
| +
|
| + // Populates a QueryInfo object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, QueryInfo* out);
|
| +
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(QueryInfo);
|
| + };
|
| +
|
| + QueryInfo query_info;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create(const std::vector<linked_ptr<Tab> >& result);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace GetSelected {
|
| + struct Params {
|
| + // Defaults to the <a href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> window_id;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create(const Tab& tab);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace GetAllInWindow {
|
| + struct Params {
|
| + // Defaults to the <a href='windows.html#current-window'>current window</a>.
|
| + scoped_ptr<int> window_id;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create(const std::vector<linked_ptr<Tab> >& tabs);
|
| + };
|
| +
|
| +};
|
| +
|
| +
|
| +} // tabs
|
| +} // api
|
| +} // extensions
|
| +
|
| +#endif // CHROME_COMMON_EXTENSIONS_API_TABS_H__
|
|
|