15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 8d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#include "base/callback_forward.h" 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/gfx/native_widget_types.h" 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This file contains functions for running a variety of browser dialogs and 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// popups. The dialogs here are the ones that the caller does not need to 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// access the class of the popup. It allows us to break dependencies by 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// allowing the callers to not depend on the classes implementing the dialogs. 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO: Make as many of these methods as possible cross platform, and move them 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// into chrome/browser/ui/browser_dialogs.h. 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class BrowserView; 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class EditSearchEngineControllerDelegate; 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class FindBar; 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class Profile; 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class TemplateURL; 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace chrome { 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Creates and returns a find bar for the given browser window. See FindBarWin. 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)FindBar* CreateFindBar(BrowserView* browser_view); 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Shows a dialog box that allows a search engine to be edited. |template_url| 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// is the search engine being edited. If it is NULL, then the dialog will add a 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// new search engine with the data the user supplies. |delegate| is an object 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// to be notified when the user is done editing, or NULL. If NULL, the dialog 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// will update the model with the user's edits directly. 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void EditSearchEngine(gfx::NativeWindow parent, 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) TemplateURL* template_url, 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) EditSearchEngineControllerDelegate* delegate, 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Profile* profile); 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace chrome 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 42