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

Side by Side Diff: chrome/browser/ui/cocoa/web_intent_sheet_controller.mm

Issue 10534093: TabContentsWrapper -> TabContents, part 37. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" 5 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h"
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
11 #import "chrome/browser/ui/cocoa/hover_close_button.h" 11 #import "chrome/browser/ui/cocoa/hover_close_button.h"
12 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h" 12 #import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
13 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 13 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
14 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 14 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
15 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h" 15 #include "chrome/browser/ui/cocoa/web_intent_picker_cocoa.h"
16 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" 16 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h"
17 #include "chrome/browser/ui/intents/web_intent_picker_model.h" 17 #include "chrome/browser/ui/intents/web_intent_picker_model.h"
18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 18 #include "chrome/browser/ui/tab_contents/tab_contents.h"
19 #include "content/public/browser/web_contents_view.h" 19 #include "content/public/browser/web_contents_view.h"
20 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
21 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
22 #include "grit/google_chrome_strings.h" 22 #include "grit/google_chrome_strings.h"
23 #include "grit/locale_settings.h" 23 #include "grit/locale_settings.h"
24 #include "grit/theme_resources.h" 24 #include "grit/theme_resources.h"
25 #include "grit/ui_resources.h" 25 #include "grit/ui_resources.h"
26 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" 26 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/l10n/l10n_util_mac.h" 28 #include "ui/base/l10n/l10n_util_mac.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 [super keyDown:event]; 495 [super keyDown:event];
496 } 496 }
497 497
498 - (void)sheetDidEnd:(NSWindow*)sheet 498 - (void)sheetDidEnd:(NSWindow*)sheet
499 returnCode:(int)returnCode 499 returnCode:(int)returnCode
500 contextInfo:(void*)contextInfo { 500 contextInfo:(void*)contextInfo {
501 if (picker_) 501 if (picker_)
502 picker_->OnSheetDidEnd(sheet); 502 picker_->OnSheetDidEnd(sheet);
503 } 503 }
504 504
505 - (void)setInlineDispositionTabContents:(TabContentsWrapper*)wrapper { 505 - (void)setInlineDispositionTabContents:(TabContents*)tabContents {
506 contents_ = wrapper; 506 contents_ = tabContents;
507 } 507 }
508 508
509 - (void)setInlineDispositionFrameSize:(NSSize)inlineContentSize { 509 - (void)setInlineDispositionFrameSize:(NSSize)inlineContentSize {
510 DCHECK(contents_); 510 DCHECK(contents_);
511 511
512 // Compute container size to fit all elements, including padding. 512 // Compute container size to fit all elements, including padding.
513 NSSize containerSize = inlineContentSize; 513 NSSize containerSize = inlineContentSize;
514 containerSize.height += 2 * kFramePadding; 514 containerSize.height += 2 * kFramePadding;
515 containerSize.width += 2 * kFramePadding + kFramePadding + kCloseButtonSize; 515 containerSize.width += 2 * kFramePadding + kFramePadding + kCloseButtonSize;
516 516
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 - (void)stopThrobber { 782 - (void)stopThrobber {
783 [closeButton_ setEnabled:YES]; 783 [closeButton_ setEnabled:YES];
784 [self setIntentButtonsEnabled:YES]; 784 [self setIntentButtonsEnabled:YES];
785 [suggestionView_ stopThrobber]; 785 [suggestionView_ stopThrobber];
786 } 786 }
787 787
788 - (void)closeSheet { 788 - (void)closeSheet {
789 [NSApp endSheet:[self window]]; 789 [NSApp endSheet:[self window]];
790 } 790 }
791 @end // WebIntentPickerSheetController 791 @end // WebIntentPickerSheetController
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698