| OLD | NEW |
| 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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/lifetime/browser_close_manager.h" | 10 #include "chrome/browser/lifetime/browser_close_manager.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 namespace signin_metrics { | 61 namespace signin_metrics { |
| 62 enum class AccessPoint; | 62 enum class AccessPoint; |
| 63 } | 63 } |
| 64 | 64 |
| 65 namespace web_modal { | 65 namespace web_modal { |
| 66 class WebContentsModalDialogHost; | 66 class WebContentsModalDialogHost; |
| 67 } | 67 } |
| 68 | 68 |
| 69 enum class ImeWarningBubblePermissionStatus; | 69 enum class ImeWarningBubblePermissionStatus; |
| 70 | 70 |
| 71 enum class ShowTranslateBubbleResult { |
| 72 // The translate bubble was successfully shown. |
| 73 SUCCESS, |
| 74 |
| 75 // The various reasons for which the translate bubble could fail to be shown. |
| 76 BROWSER_WINDOW_NOT_VALID, |
| 77 BROWSER_WINDOW_MINIMIZED, |
| 78 BROWSER_WINDOW_NOT_ACTIVE, |
| 79 WEB_CONTENTS_NOT_ACTIVE, |
| 80 EDITABLE_FIELD_IS_ACTIVE, |
| 81 }; |
| 82 |
| 71 //////////////////////////////////////////////////////////////////////////////// | 83 //////////////////////////////////////////////////////////////////////////////// |
| 72 // BrowserWindow interface | 84 // BrowserWindow interface |
| 73 // An interface implemented by the "view" of the Browser window. | 85 // An interface implemented by the "view" of the Browser window. |
| 74 // This interface includes ui::BaseWindow methods as well as Browser window | 86 // This interface includes ui::BaseWindow methods as well as Browser window |
| 75 // specific methods. | 87 // specific methods. |
| 76 // | 88 // |
| 77 // NOTE: All getters may return NULL. | 89 // NOTE: All getters may return NULL. |
| 78 // | 90 // |
| 79 class BrowserWindow : public ui::BaseWindow { | 91 class BrowserWindow : public ui::BaseWindow { |
| 80 public: | 92 public: |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // Shows the "Save credit card" bubble. | 247 // Shows the "Save credit card" bubble. |
| 236 virtual autofill::SaveCardBubbleView* ShowSaveCreditCardBubble( | 248 virtual autofill::SaveCardBubbleView* ShowSaveCreditCardBubble( |
| 237 content::WebContents* contents, | 249 content::WebContents* contents, |
| 238 autofill::SaveCardBubbleController* controller, | 250 autofill::SaveCardBubbleController* controller, |
| 239 bool is_user_gesture) = 0; | 251 bool is_user_gesture) = 0; |
| 240 | 252 |
| 241 // Shows the translate bubble. | 253 // Shows the translate bubble. |
| 242 // | 254 // |
| 243 // |is_user_gesture| is true when the bubble is shown on the user's deliberate | 255 // |is_user_gesture| is true when the bubble is shown on the user's deliberate |
| 244 // action. | 256 // action. |
| 245 virtual void ShowTranslateBubble( | 257 virtual ShowTranslateBubbleResult ShowTranslateBubble( |
| 246 content::WebContents* contents, | 258 content::WebContents* contents, |
| 247 translate::TranslateStep step, | 259 translate::TranslateStep step, |
| 248 translate::TranslateErrors::Type error_type, | 260 translate::TranslateErrors::Type error_type, |
| 249 bool is_user_gesture) = 0; | 261 bool is_user_gesture) = 0; |
| 250 | 262 |
| 251 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) | 263 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) |
| 252 // Callback type used with the ShowOneClickSigninConfirmation() method. If the | 264 // Callback type used with the ShowOneClickSigninConfirmation() method. If the |
| 253 // user chooses to accept the sign in, the callback is called to start the | 265 // user chooses to accept the sign in, the callback is called to start the |
| 254 // sync process. | 266 // sync process. |
| 255 typedef base::Callback<void(OneClickSigninSyncStarter::StartSyncMode)> | 267 typedef base::Callback<void(OneClickSigninSyncStarter::StartSyncMode)> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 virtual std::string GetWorkspace() const = 0; | 393 virtual std::string GetWorkspace() const = 0; |
| 382 virtual bool IsVisibleOnAllWorkspaces() const = 0; | 394 virtual bool IsVisibleOnAllWorkspaces() const = 0; |
| 383 | 395 |
| 384 protected: | 396 protected: |
| 385 friend class BrowserCloseManager; | 397 friend class BrowserCloseManager; |
| 386 friend class BrowserView; | 398 friend class BrowserView; |
| 387 virtual void DestroyBrowser() = 0; | 399 virtual void DestroyBrowser() = 0; |
| 388 }; | 400 }; |
| 389 | 401 |
| 390 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ | 402 #endif // CHROME_BROWSER_UI_BROWSER_WINDOW_H_ |
| OLD | NEW |