| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 void BrowserWindowCocoa::ShowUpdateChromeDialog() { | 486 void BrowserWindowCocoa::ShowUpdateChromeDialog() { |
| 487 restart_browser::RequestRestart(window()); | 487 restart_browser::RequestRestart(window()); |
| 488 } | 488 } |
| 489 | 489 |
| 490 void BrowserWindowCocoa::ShowBookmarkBubble(const GURL& url, | 490 void BrowserWindowCocoa::ShowBookmarkBubble(const GURL& url, |
| 491 bool already_bookmarked) { | 491 bool already_bookmarked) { |
| 492 [controller_ showBookmarkBubbleForURL:url | 492 [controller_ showBookmarkBubbleForURL:url |
| 493 alreadyBookmarked:(already_bookmarked ? YES : NO)]; | 493 alreadyBookmarked:(already_bookmarked ? YES : NO)]; |
| 494 } | 494 } |
| 495 | 495 |
| 496 void BrowserWindowCocoa::ShowTranslateBubble( |
| 497 content::WebContents* contents, |
| 498 TranslateBubbleModel::ViewState view_state) { |
| 499 } |
| 500 |
| 496 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 501 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 497 void BrowserWindowCocoa::ShowOneClickSigninBubble( | 502 void BrowserWindowCocoa::ShowOneClickSigninBubble( |
| 498 OneClickSigninBubbleType type, | 503 OneClickSigninBubbleType type, |
| 499 const string16& email, | 504 const string16& email, |
| 500 const string16& error_message, | 505 const string16& error_message, |
| 501 const StartSyncCallback& start_sync_callback) { | 506 const StartSyncCallback& start_sync_callback) { |
| 502 WebContents* web_contents = | 507 WebContents* web_contents = |
| 503 browser_->tab_strip_model()->GetActiveWebContents(); | 508 browser_->tab_strip_model()->GetActiveWebContents(); |
| 504 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { | 509 if (type == ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) { |
| 505 base::scoped_nsobject<OneClickSigninBubbleController> bubble_controller([ | 510 base::scoped_nsobject<OneClickSigninBubbleController> bubble_controller([ |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 // further, both by another H, i.e. WebContentsView's height becomes | 758 // further, both by another H, i.e. WebContentsView's height becomes |
| 754 // A.height() + H and RenderWidgetHostView's height becomes A.height() + 2H. | 759 // A.height() + H and RenderWidgetHostView's height becomes A.height() + 2H. |
| 755 // Strangely, the RenderWidgetHostView for the previous navigation entry also | 760 // Strangely, the RenderWidgetHostView for the previous navigation entry also |
| 756 // gets enlarged by H. | 761 // gets enlarged by H. |
| 757 // I believe these "automatic" resizing are caused by setAutoresizingMask of | 762 // I believe these "automatic" resizing are caused by setAutoresizingMask of |
| 758 // of the cocoa view in WebContentsViewMac, which defeats the purpose of | 763 // of the cocoa view in WebContentsViewMac, which defeats the purpose of |
| 759 // WebContentsDelegate::GetSizeForNewRenderView i.e. to prevent resizing of | 764 // WebContentsDelegate::GetSizeForNewRenderView i.e. to prevent resizing of |
| 760 // RenderWidgetHostView in (2) and (3). | 765 // RenderWidgetHostView in (2) and (3). |
| 761 return 0; | 766 return 0; |
| 762 } | 767 } |
| OLD | NEW |