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

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: Use kAnimateNone Created 6 years, 9 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 fb9cf89db20062b62b650c3fb76fc3fa5cb93fcc..aed9187114af3398b545c0d1509f98eb55608f84 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;
@@ -44,6 +46,7 @@ class StatusBubbleMac;
@class TabStripController;
@class TabStripView;
@class ToolbarController;
+@class TranslateBubbleController;
namespace content {
class WebContents;
@@ -91,6 +94,8 @@ class Command;
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).
@@ -244,6 +249,9 @@ class Command;
// 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.
@@ -317,6 +325,12 @@ class Command;
- (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;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698