| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "chrome/browser/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <numeric> | 8 #include <numeric> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents | 1790 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents |
| 1791 step:(translate::TranslateStep)step | 1791 step:(translate::TranslateStep)step |
| 1792 errorType:(translate::TranslateErrors::Type) | 1792 errorType:(translate::TranslateErrors::Type) |
| 1793 errorType { | 1793 errorType { |
| 1794 // TODO(hajimehoshi): The similar logic exists at TranslateBubbleView:: | 1794 // TODO(hajimehoshi): The similar logic exists at TranslateBubbleView:: |
| 1795 // ShowBubble. This should be unified. | 1795 // ShowBubble. This should be unified. |
| 1796 if (translateBubbleController_) { | 1796 if (translateBubbleController_) { |
| 1797 // When the user reads the advanced setting panel, the bubble should not be | 1797 // When the user reads the advanced setting panel, the bubble should not be |
| 1798 // changed because he/she is focusing on the bubble. | 1798 // changed because they are focusing on the bubble. |
| 1799 if (translateBubbleController_.webContents == contents && | 1799 if (translateBubbleController_.webContents == contents && |
| 1800 translateBubbleController_.model->GetViewState() == | 1800 translateBubbleController_.model->GetViewState() == |
| 1801 TranslateBubbleModel::VIEW_STATE_ADVANCED) { | 1801 TranslateBubbleModel::VIEW_STATE_ADVANCED) { |
| 1802 return; | 1802 return; |
| 1803 } | 1803 } |
| 1804 if (step != translate::TRANSLATE_STEP_TRANSLATE_ERROR) { | 1804 if (step != translate::TRANSLATE_STEP_TRANSLATE_ERROR) { |
| 1805 TranslateBubbleModel::ViewState viewState = | 1805 TranslateBubbleModel::ViewState viewState = |
| 1806 TranslateBubbleModelImpl::TranslateStepToViewState(step); | 1806 TranslateBubbleModelImpl::TranslateStepToViewState(step); |
| 1807 [translateBubbleController_ switchView:viewState]; | 1807 [translateBubbleController_ switchView:viewState]; |
| 1808 } else { | 1808 } else { |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2231 | 2231 |
| 2232 - (BOOL)supportsBookmarkBar { | 2232 - (BOOL)supportsBookmarkBar { |
| 2233 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2233 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2234 } | 2234 } |
| 2235 | 2235 |
| 2236 - (BOOL)isTabbedWindow { | 2236 - (BOOL)isTabbedWindow { |
| 2237 return browser_->is_type_tabbed(); | 2237 return browser_->is_type_tabbed(); |
| 2238 } | 2238 } |
| 2239 | 2239 |
| 2240 @end // @implementation BrowserWindowController(WindowType) | 2240 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |