blob: 3cc915f6e0150f461af9fa3cf1b5e00ece6b9a8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (c) 2011 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_BROWSER_WEBUI_OPTIONS_ADD_STARTUP_PAGE_HANDLER_H_
#define CHROME_BROWSER_WEBUI_OPTIONS_ADD_STARTUP_PAGE_HANDLER_H_
#pragma once
#include "base/basictypes.h"
#include "chrome/browser/dom_ui/options/options_ui.h"
#include "ui/base/models/table_model_observer.h"
class PossibleURLModel;
// Chrome personal options page UI handler.
class AddStartupPageHandler : public OptionsPageUIHandler,
public ui::TableModelObserver {
public:
AddStartupPageHandler();
virtual ~AddStartupPageHandler();
// OptionsPageUIHandler implementation.
virtual void Initialize();
virtual void GetLocalizedValues(DictionaryValue* localized_strings);
virtual void RegisterMessages();
// ui::TableModelObserver implementation.
virtual void OnModelChanged();
virtual void OnItemsChanged(int start, int length);
virtual void OnItemsAdded(int start, int length);
virtual void OnItemsRemoved(int start, int length);
private:
// Request to update the text field with the URL of the recent page at the
// given index, formatted for user input. Called from WebUI.
void UpdateFieldWithRecentPage(const ListValue* args);
scoped_ptr<PossibleURLModel> url_table_model_;
DISALLOW_COPY_AND_ASSIGN(AddStartupPageHandler);
};
#endif // CHROME_BROWSER_WEBUI_OPTIONS_ADD_STARTUP_PAGE_HANDLER_H_
|