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

Unified Diff: chrome/browser/ui/cocoa/translate/translate_bubble_controller.h

Issue 151283006: Mac OS X: Show the Translate icon on Omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue-307352-translate-bubble-2
Patch Set: Nico's review Created 6 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/translate/translate_bubble_controller.h
diff --git a/chrome/browser/ui/cocoa/translate/translate_bubble_controller.h b/chrome/browser/ui/cocoa/translate/translate_bubble_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..7598dbab264e9a741f881e2b573773db9956ecfa
--- /dev/null
+++ b/chrome/browser/ui/cocoa/translate/translate_bubble_controller.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/memory/scoped_ptr.h"
+#import "chrome/browser/ui/cocoa/base_bubble_controller.h"
+#include "chrome/browser/ui/translate/translate_bubble_model.h"
+#include "components/translate/core/common/translate_errors.h"
+
+@class BrowserWindowController;
+
+namespace content {
+class WebContents;
+}
+
+// Displays the Translate bubble. The Translate bubble is a bubble which
+// pops up when clicking the Translate icon on Omnibox. This bubble
+// allows us to translate a foreign page into user-selected language,
+// revert this, and configure the translate setting.
+@interface TranslateBubbleController : BaseBubbleController {
+ @private
+ content::WebContents* webContents_;
+ scoped_ptr<TranslateBubbleModel> model_;
+
+ // Whether the translation is actually executed.
groby-ooo-7-16 2014/02/11 00:43:55 "isTranslated" might be a better name?
hajimehoshi 2014/02/25 09:31:07 It is intended to be true even when the page is tr
+ BOOL translateExecuted_;
+}
+
++ (void)
+ showBubbleWithBrowserWindowController:(BrowserWindowController*)controller
+ webContents:(content::WebContents*)webContents
+ viewState:
+ (TranslateBubbleModel::ViewState)viewState
+ errorType:(TranslateErrors::Type)errorType;
+
+@end

Powered by Google App Engine
This is Rietveld 408576698