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

Side by Side Diff: chrome/browser/ui/views/translate/translate_bubble_view.h

Issue 87503004: Pass the Translate error type to the bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebasing) Created 7 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/browser/ui/translate/language_combobox_model.h" 12 #include "chrome/browser/ui/translate/language_combobox_model.h"
13 #include "chrome/browser/ui/translate/translate_bubble_model.h" 13 #include "chrome/browser/ui/translate/translate_bubble_model.h"
14 #include "chrome/common/translate/translate_errors.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 #include "ui/views/bubble/bubble_delegate.h" 16 #include "ui/views/bubble/bubble_delegate.h"
16 #include "ui/views/controls/button/button.h" 17 #include "ui/views/controls/button/button.h"
17 #include "ui/views/controls/combobox/combobox_listener.h" 18 #include "ui/views/controls/combobox/combobox_listener.h"
18 #include "ui/views/controls/link_listener.h" 19 #include "ui/views/controls/link_listener.h"
19 20
20 class Browser; 21 class Browser;
21 class PrefService; 22 class PrefService;
22 class TranslateBubbleModel; 23 class TranslateBubbleModel;
23 24
(...skipping 10 matching lines...) Expand all
34 public views::ComboboxListener, 35 public views::ComboboxListener,
35 public views::LinkListener, 36 public views::LinkListener,
36 public content::WebContentsObserver { 37 public content::WebContentsObserver {
37 public: 38 public:
38 virtual ~TranslateBubbleView(); 39 virtual ~TranslateBubbleView();
39 40
40 // Shows the Translate bubble. 41 // Shows the Translate bubble.
41 static void ShowBubble(views::View* anchor_view, 42 static void ShowBubble(views::View* anchor_view,
42 content::WebContents* web_contents, 43 content::WebContents* web_contents,
43 TranslateBubbleModel::ViewState type, 44 TranslateBubbleModel::ViewState type,
45 TranslateErrors::Type error_type,
44 Browser* browser); 46 Browser* browser);
45 47
46 // If true, the Translate bubble is being shown. 48 // If true, the Translate bubble is being shown.
47 static bool IsShowing(); 49 static bool IsShowing();
48 50
49 // Returns the bubble view currently shown. This may return NULL. 51 // Returns the bubble view currently shown. This may return NULL.
50 static TranslateBubbleView* GetCurrentBubble(); 52 static TranslateBubbleView* GetCurrentBubble();
51 53
52 TranslateBubbleModel* model() { return model_.get(); } 54 TranslateBubbleModel* model() { return model_.get(); }
53 55
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // The browser to open the help URL into a new tab. 184 // The browser to open the help URL into a new tab.
183 Browser* browser_; 185 Browser* browser_;
184 186
185 // Whether the translation is acutually executed. 187 // Whether the translation is acutually executed.
186 bool translate_executed_; 188 bool translate_executed_;
187 189
188 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); 190 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView);
189 }; 191 };
190 192
191 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ 193 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/translate/translate_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698