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

Side by Side Diff: chrome/browser/ui/cocoa/translate/translate_bubble_controller.h

Issue 2542173002: [Mac] Omnibox icons active states (Closed)
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 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 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "chrome/browser/translate/chrome_translate_client.h" 10 #include "chrome/browser/translate/chrome_translate_client.h"
11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 11 #import "chrome/browser/ui/cocoa/omnibox_decoration_bubble_controller.h"
12 #include "components/translate/core/common/translate_errors.h" 12 #include "components/translate/core/common/translate_errors.h"
13 13
14 @class BrowserWindowController; 14 @class BrowserWindowController;
15 15
16 class LanguageComboboxModel; 16 class LanguageComboboxModel;
17 class TranslateBubbleModel; 17 class TranslateBubbleModel;
18 class TranslateDenialComboboxModel; 18 class TranslateDenialComboboxModel;
19 19
20 namespace content { 20 namespace content {
21 class WebContents; 21 class WebContents;
22 } 22 }
23 23
24 // Displays the Translate bubble. The Translate bubble is a bubble which 24 // Displays the Translate bubble. The Translate bubble is a bubble which
25 // pops up when clicking the Translate icon on Omnibox. This bubble 25 // pops up when clicking the Translate icon on Omnibox. This bubble
26 // allows us to translate a foreign page into user-selected language, 26 // allows us to translate a foreign page into user-selected language,
27 // revert this, and configure the translate setting. 27 // revert this, and configure the translate setting.
28 @interface TranslateBubbleController 28 @interface TranslateBubbleController
29 : BaseBubbleController<NSTextViewDelegate> { 29 : OmniboxDecorationBubbleController<NSTextViewDelegate> {
30 @private 30 @private
31 content::WebContents* webContents_; 31 content::WebContents* webContents_;
32 std::unique_ptr<TranslateBubbleModel> model_; 32 std::unique_ptr<TranslateBubbleModel> model_;
33 33
34 // The views of each state. The keys are TranslateBubbleModel::ViewState, 34 // The views of each state. The keys are TranslateBubbleModel::ViewState,
35 // and the values are NSView*. 35 // and the values are NSView*.
36 base::scoped_nsobject<NSDictionary> views_; 36 base::scoped_nsobject<NSDictionary> views_;
37 37
38 // The 'Done' or 'Translate' button on the advanced (option) panel. 38 // The 'Done' or 'Translate' button on the advanced (option) panel.
39 NSButton* advancedDoneButton_; 39 NSButton* advancedDoneButton_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 - (void)switchToErrorView:(translate::TranslateErrors::Type)errorType; 82 - (void)switchToErrorView:(translate::TranslateErrors::Type)errorType;
83 83
84 @end 84 @end
85 85
86 // The methods on this category are used internally by the controller and are 86 // The methods on this category are used internally by the controller and are
87 // only exposed for testing purposes. DO NOT USE OTHERWISE. 87 // only exposed for testing purposes. DO NOT USE OTHERWISE.
88 @interface TranslateBubbleController (ExposedForTesting) 88 @interface TranslateBubbleController (ExposedForTesting)
89 - (IBAction)handleCloseButtonPressed:(id)sender; 89 - (IBAction)handleCloseButtonPressed:(id)sender;
90 - (IBAction)handleTranslateButtonPressed:(id)sender; 90 - (IBAction)handleTranslateButtonPressed:(id)sender;
91 @end 91 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698