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

Side by Side Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

Issue 12634025: Inconsistent use of [x] close panel icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_173251
Patch Set: Fixed compile on linux, mac and win Created 7 years, 9 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
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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
11 #include "grit/theme_resources.h"
11 #include "grit/ui_resources.h" 12 #include "grit/ui_resources.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/browser_finder.h" 14 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/browser/ui/cocoa/browser_window_controller.h" 15 #include "chrome/browser/ui/cocoa/browser_window_controller.h"
15 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" 16 #import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
16 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h" 17 #import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h"
17 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h" 18 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h"
18 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h" 19 #import "chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h"
19 #import "chrome/browser/ui/cocoa/image_button_cell.h" 20 #import "chrome/browser/ui/cocoa/image_button_cell.h"
20 #import "chrome/browser/ui/cocoa/nsview_additions.h" 21 #import "chrome/browser/ui/cocoa/nsview_additions.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 DCHECK(!findBarBridge_); // should only be called once. 126 DCHECK(!findBarBridge_); // should only be called once.
126 findBarBridge_ = findBarBridge; 127 findBarBridge_ = findBarBridge;
127 } 128 }
128 129
129 - (void)setBrowserWindowController:(BrowserWindowController*)controller { 130 - (void)setBrowserWindowController:(BrowserWindowController*)controller {
130 DCHECK(!browserWindowController_); // should only be called once. 131 DCHECK(!browserWindowController_); // should only be called once.
131 browserWindowController_ = controller; 132 browserWindowController_ = controller;
132 } 133 }
133 134
134 - (void)awakeFromNib { 135 - (void)awakeFromNib {
135 [[closeButton_ cell] setImageID:IDR_CLOSE_BAR 136 [[closeButton_ cell] setImageID:IDR_CLOSE_1
136 forButtonState:image_button_cell::kDefaultState]; 137 forButtonState:image_button_cell::kDefaultState];
137 [[closeButton_ cell] setImageID:IDR_CLOSE_BAR_H 138 [[closeButton_ cell] setImageID:IDR_CLOSE_1_H
138 forButtonState:image_button_cell::kHoverState]; 139 forButtonState:image_button_cell::kHoverState];
139 [[closeButton_ cell] setImageID:IDR_CLOSE_BAR_P 140 [[closeButton_ cell] setImageID:IDR_CLOSE_1_P
140 forButtonState:image_button_cell::kPressedState]; 141 forButtonState:image_button_cell::kPressedState];
141 [[closeButton_ cell] setImageID:IDR_CLOSE_BAR 142 [[closeButton_ cell] setImageID:IDR_CLOSE_1
142 forButtonState:image_button_cell::kDisabledState]; 143 forButtonState:image_button_cell::kDisabledState];
143 144
144 [findBarView_ setFrame:[self hiddenFindBarFrame]]; 145 [findBarView_ setFrame:[self hiddenFindBarFrame]];
145 defaultWidth_ = NSWidth([findBarView_ frame]); 146 defaultWidth_ = NSWidth([findBarView_ frame]);
146 147
147 [self prepopulateText:[[FindPasteboard sharedInstance] findText]]; 148 [self prepopulateText:[[FindPasteboard sharedInstance] findText]];
148 } 149 }
149 150
150 - (IBAction)close:(id)sender { 151 - (IBAction)close:(id)sender {
151 if (findBarBridge_) 152 if (findBarBridge_)
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 content::WebContents* webContents = tabStripModel->GetWebContentsAt(i); 650 content::WebContents* webContents = tabStripModel->GetWebContentsAt(i);
650 if (suppressPboardUpdateActions_ && activeWebContents == webContents) 651 if (suppressPboardUpdateActions_ && activeWebContents == webContents)
651 continue; 652 continue;
652 FindTabHelper* findTabHelper = 653 FindTabHelper* findTabHelper =
653 FindTabHelper::FromWebContents(webContents); 654 FindTabHelper::FromWebContents(webContents);
654 findTabHelper->StopFinding(FindBarController::kClearSelectionOnPage); 655 findTabHelper->StopFinding(FindBarController::kClearSelectionOnPage);
655 findBarBridge_->ClearResults(findTabHelper->find_result()); 656 findBarBridge_->ClearResults(findTabHelper->find_result());
656 } 657 }
657 } 658 }
658 @end 659 @end
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/options_page.css ('k') | chrome/browser/ui/cocoa/hover_close_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698