browser_dialogs.h revision 8bcbed890bc3ce4d7a057a8f32cab53fa534672e
1818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// Use of this source code is governed by a BSD-style license that can be
3818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// found in the LICENSE file.
4818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com
5818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com#ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_
6818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com#define CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_
7818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com
8818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com#include "base/callback_forward.h"
9818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com#include "ui/gfx/native_widget_types.h"
10818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com
1165b427cff9cd34a06ff060d65d00cc3615d8fd94caryclark// This file contains functions for running a variety of browser dialogs and
12818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// popups. The dialogs here are the ones that the caller does not need to
1366089e4ec4f1702caf2154780471417872862148caryclark@google.com// access the class of the popup. It allows us to break dependencies by
14818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// allowing the callers to not depend on the classes implementing the dialogs.
15818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// TODO: Make as many of these methods as possible cross platform, and move them
1666089e4ec4f1702caf2154780471417872862148caryclark@google.com// into chrome/browser/ui/browser_dialogs.h.
1766089e4ec4f1702caf2154780471417872862148caryclark@google.com
18818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.comclass BrowserView;
1965b427cff9cd34a06ff060d65d00cc3615d8fd94caryclarkclass EditSearchEngineControllerDelegate;
2065b427cff9cd34a06ff060d65d00cc3615d8fd94caryclarkclass FindBar;
2166089e4ec4f1702caf2154780471417872862148caryclark@google.comclass Profile;
22818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.comclass TemplateURL;
23818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com
244431e7757cfcb8cfa99535eed0e9f156dabf95c2commit-bot@chromium.orgnamespace chrome {
25818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com
26818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// Creates and returns a find bar for the given browser window. See FindBarWin.
27818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.comFindBar* CreateFindBar(BrowserView* browser_view);
28818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com
29818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// Shows a dialog box that allows a search engine to be edited. |template_url|
30818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// is the search engine being edited. If it is NULL, then the dialog will add a
31818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// new search engine with the data the user supplies. |delegate| is an object
32818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com// to be notified when the user is done editing, or NULL. If NULL, the dialog
334431e7757cfcb8cfa99535eed0e9f156dabf95c2commit-bot@chromium.org// will update the model with the user's edits directly.
344431e7757cfcb8cfa99535eed0e9f156dabf95c2commit-bot@chromium.orgvoid EditSearchEngine(gfx::NativeWindow parent,
354431e7757cfcb8cfa99535eed0e9f156dabf95c2commit-bot@chromium.org                      TemplateURL* template_url,
368d0a524a4847bc7e1cc63a93b78922739466c201caryclark@google.com                      EditSearchEngineControllerDelegate* delegate,
374431e7757cfcb8cfa99535eed0e9f156dabf95c2commit-bot@chromium.org                      Profile* profile);
3866089e4ec4f1702caf2154780471417872862148caryclark@google.com
3966089e4ec4f1702caf2154780471417872862148caryclark@google.com}  // namespace chrome
404431e7757cfcb8cfa99535eed0e9f156dabf95c2commit-bot@chromium.org
41818b0cc1b8b0c4acc565e8e2cb8b0b61aa5a300ecaryclark@google.com#endif  // CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_
42406654be7a930b484159f5bca107d3b11d8a9edemtklein