OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import <Cocoa/Cocoa.h> |
| 6 |
| 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "chrome/browser/translate/translate_tab_helper.h" |
| 9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| 10 #include "components/translate/core/common/translate_errors.h" |
| 11 |
| 12 @class BrowserWindowController; |
| 13 |
| 14 class TranslateBubbleModel; |
| 15 |
| 16 namespace content { |
| 17 class WebContents; |
| 18 } |
| 19 |
| 20 // Displays the Translate bubble. The Translate bubble is a bubble which |
| 21 // pops up when clicking the Translate icon on Omnibox. This bubble |
| 22 // allows us to translate a foreign page into user-selected language, |
| 23 // revert this, and configure the translate setting. |
| 24 @interface TranslateBubbleController : BaseBubbleController { |
| 25 @private |
| 26 content::WebContents* webContents_; |
| 27 scoped_ptr<TranslateBubbleModel> model_; |
| 28 |
| 29 // Whether the translation is actually executed once at least. |
| 30 BOOL translateExecuted_; |
| 31 } |
| 32 |
| 33 @property(readonly, nonatomic) const content::WebContents* webContents; |
| 34 @property(readonly, nonatomic) const TranslateBubbleModel* model; |
| 35 |
| 36 - (id)initWithParentWindow:(BrowserWindowController*)controller |
| 37 model:(scoped_ptr<TranslateBubbleModel>)model |
| 38 webContents:(content::WebContents*)webContents; |
| 39 - (void)switchView:(TranslateBubbleModel::ViewState)viewState; |
| 40 - (void)switchToErrorView:(TranslateErrors::Type)errorType; |
| 41 |
| 42 @end |
OLD | NEW |