Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chrome/browser/ui/browser_window.h

Issue 25373009: Translate: New Bubble UX (for the view toolkit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix: view id on tests Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_BROWSER_UI_BROWSER_WINDOW_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_WINDOW_H_
6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_ 6 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "chrome/browser/lifetime/browser_close_manager.h" 9 #include "chrome/browser/lifetime/browser_close_manager.h"
10 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" 10 #include "chrome/browser/ui/bookmarks/bookmark_bar.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" 12 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h"
13 #include "chrome/browser/ui/host_desktop.h" 13 #include "chrome/browser/ui/host_desktop.h"
14 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" 14 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
15 #include "chrome/browser/ui/translate/translate_bubble_model.h"
15 #include "chrome/common/content_settings_types.h" 16 #include "chrome/common/content_settings_types.h"
16 #include "ui/base/base_window.h" 17 #include "ui/base/base_window.h"
17 #include "ui/base/window_open_disposition.h" 18 #include "ui/base/window_open_disposition.h"
18 #include "ui/gfx/native_widget_types.h" 19 #include "ui/gfx/native_widget_types.h"
19 20
20 class Browser; 21 class Browser;
21 class BrowserWindowTesting; 22 class BrowserWindowTesting;
22 class DownloadShelf; 23 class DownloadShelf;
23 class FindBar; 24 class FindBar;
24 class GURL; 25 class GURL;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 virtual void ShowUpdateChromeDialog() = 0; 213 virtual void ShowUpdateChromeDialog() = 0;
213 214
214 // Shows the Bookmark bubble. |url| is the URL being bookmarked, 215 // Shows the Bookmark bubble. |url| is the URL being bookmarked,
215 // |already_bookmarked| is true if the url is already bookmarked. 216 // |already_bookmarked| is true if the url is already bookmarked.
216 virtual void ShowBookmarkBubble(const GURL& url, bool already_bookmarked) = 0; 217 virtual void ShowBookmarkBubble(const GURL& url, bool already_bookmarked) = 0;
217 218
218 // Shows the bookmark prompt. 219 // Shows the bookmark prompt.
219 // TODO(yosin): Make ShowBookmarkPrompt pure virtual. 220 // TODO(yosin): Make ShowBookmarkPrompt pure virtual.
220 virtual void ShowBookmarkPrompt() {} 221 virtual void ShowBookmarkPrompt() {}
221 222
223 // Shows the translate bubble.
224 virtual void ShowTranslateBubble(
225 content::WebContents* contents,
226 TranslateBubbleModel::ViewState view_state) = 0;
227
222 #if defined(ENABLE_ONE_CLICK_SIGNIN) 228 #if defined(ENABLE_ONE_CLICK_SIGNIN)
223 enum OneClickSigninBubbleType { 229 enum OneClickSigninBubbleType {
224 ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE, 230 ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE,
225 ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG, 231 ONE_CLICK_SIGNIN_BUBBLE_TYPE_MODAL_DIALOG,
226 ONE_CLICK_SIGNIN_BUBBLE_TYPE_SAML_MODAL_DIALOG 232 ONE_CLICK_SIGNIN_BUBBLE_TYPE_SAML_MODAL_DIALOG
227 }; 233 };
228 234
229 // Callback type used with the ShowOneClickSigninBubble() method. If the 235 // Callback type used with the ShowOneClickSigninBubble() method. If the
230 // user chooses to accept the sign in, the callback is called to start the 236 // user chooses to accept the sign in, the callback is called to start the
231 // sync process. 237 // sync process.
232 typedef base::Callback<void(OneClickSigninSyncStarter::StartSyncMode)> 238 typedef base::Callback<void(OneClickSigninSyncStarter::StartSyncMode)>
233 StartSyncCallback; 239 StartSyncCallback;
234 240
235 // Shows the one-click sign in bubble. |email| holds the full email address 241 // Shows the one-click sign in bubble. |email| holds the full email address
236 // of the account that has signed in. 242 // of the account that has signed in.
237 virtual void ShowOneClickSigninBubble( 243 virtual void ShowOneClickSigninBubble(
238 OneClickSigninBubbleType type, 244 OneClickSigninBubbleType type,
239 const string16& email, 245 const string16& email,
240 const string16& error_message, 246 const string16& error_message,
241 const StartSyncCallback& start_sync_callback) = 0; 247 const StartSyncCallback& start_sync_callback) = 0;
242 #endif 248 #endif
243 249
244 // Whether or not the shelf view is visible. 250 // Whether or not the shelf view is visible.
245 virtual bool IsDownloadShelfVisible() const = 0; 251 virtual bool IsDownloadShelfVisible() const = 0;
246 252
247 // Returns the DownloadShelf. 253 // Returns the DownloadShelf.
248 virtual DownloadShelf* GetDownloadShelf() = 0; 254 virtual DownloadShelf* GetDownloadShelf() = 0;
249 255
250 // Shows the confirmation dialog box warning that the browser is closing with 256 // Shows the confirmation dialog box warning that the browser is closing with
251 // in-progress downloads. 257 // in-progress downloads.
252 // This method should call |callback| with the user's response. 258 // This method should call |callback| with the user's response.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 406
401 // Returns the ToolbarView. 407 // Returns the ToolbarView.
402 virtual ToolbarView* GetToolbarView() const = 0; 408 virtual ToolbarView* GetToolbarView() const = 0;
403 #endif 409 #endif
404 410
405 protected: 411 protected:
406 virtual ~BrowserWindowTesting() {} 412 virtual ~BrowserWindowTesting() {}
407 }; 413 };
408 414
409 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ 415 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_language_state_observer.cc ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698