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

Unified Diff: chrome/browser/ui/cocoa/browser_window_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: groby'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/browser_window_controller.h
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.h b/chrome/browser/ui/cocoa/browser_window_controller.h
index b769147c18404a3f940822a61e4c5a345fe50ab3..76e89fbb5f076005003de9294a088328ff6cd643 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.h
+++ b/chrome/browser/ui/cocoa/browser_window_controller.h
@@ -14,6 +14,7 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/translate/translate_tab_helper.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
#import "chrome/browser/ui/cocoa/browser_command_executor.h"
@@ -23,6 +24,7 @@
#import "chrome/browser/ui/cocoa/themed_window.h"
#import "chrome/browser/ui/cocoa/url_drop_target.h"
#import "chrome/browser/ui/cocoa/view_resizer.h"
+#include "components/translate/core/common/translate_errors.h"
#include "ui/gfx/rect.h"
@class AvatarBaseController;
@@ -43,6 +45,7 @@ class StatusBubbleMac;
@class TabStripController;
@class TabStripView;
@class ToolbarController;
+@class TranslateBubbleController;
namespace content {
class WebContents;
@@ -86,6 +89,8 @@ class WebContents;
BOOL initializing_; // YES while we are currently in initWithBrowser:
BOOL ownsBrowser_; // Only ever NO when testing
+ TranslateBubbleController* translateBubbleController_; // Weak.
+
// The total amount by which we've grown the window up or down (to display a
// bookmark bar and/or download shelf), respectively; reset to 0 when moved
// away from the bottom/top or resized (or zoomed).
@@ -236,6 +241,9 @@ class WebContents;
// Sets whether or not the current page in the frontmost tab is bookmarked.
- (void)setStarredState:(BOOL)isStarred;
+// Sets whether or not the current page is translated.
+- (void)setCurrentPageIsTranslated:(BOOL)on;
+
// Happens when the zoom level is changed in the active tab, the active tab is
// changed, or a new browser window or tab is created. |canShowBubble| denotes
// whether it would be appropriate to show a zoom bubble or not.
@@ -309,6 +317,12 @@ class WebContents;
- (void)showBookmarkBubbleForURL:(const GURL&)url
alreadyBookmarked:(BOOL)alreadyBookmarked;
+// Show the translate bubble.
+- (void)showTranslateBubbleForWebContents:(content::WebContents*)contents
+ step:
+ (TranslateTabHelper::TranslateStep)step
+ errorType:(TranslateErrors::Type)errorType;
+
// Shows or hides the docked web inspector depending on |contents|'s state.
- (void)updateDevToolsForContents:(content::WebContents*)contents;

Powered by Google App Engine
This is Rietveld 408576698