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

Side by Side Diff: chrome/browser/cocoa/location_bar/location_bar_view_mac.mm

Issue 3132031: Mac: Disable first-run bubble for m6. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/nsimage_cache_mac.h" 9 #include "base/nsimage_cache_mac.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED, 94 NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
95 NotificationService::AllSources()); 95 NotificationService::AllSources());
96 } 96 }
97 97
98 LocationBarViewMac::~LocationBarViewMac() { 98 LocationBarViewMac::~LocationBarViewMac() {
99 // Disconnect from cell in case it outlives us. 99 // Disconnect from cell in case it outlives us.
100 [[field_ cell] clearDecorations]; 100 [[field_ cell] clearDecorations];
101 } 101 }
102 102
103 void LocationBarViewMac::ShowFirstRunBubble(FirstRun::BubbleType bubble_type) { 103 void LocationBarViewMac::ShowFirstRunBubble(FirstRun::BubbleType bubble_type) {
104 // Disabled for chrome 6: http://crbug.com/52726
105
104 // We need the browser window to be shown before we can show the bubble, but 106 // We need the browser window to be shown before we can show the bubble, but
105 // we get called before that's happened. 107 // we get called before that's happened.
106 Task* task = first_run_bubble_.NewRunnableMethod( 108 //Task* task = first_run_bubble_.NewRunnableMethod(
107 &LocationBarViewMac::ShowFirstRunBubbleInternal, bubble_type); 109 // &LocationBarViewMac::ShowFirstRunBubbleInternal, bubble_type);
108 MessageLoop::current()->PostTask(FROM_HERE, task); 110 //MessageLoop::current()->PostTask(FROM_HERE, task);
109 } 111 }
110 112
111 void LocationBarViewMac::ShowFirstRunBubbleInternal( 113 void LocationBarViewMac::ShowFirstRunBubbleInternal(
112 FirstRun::BubbleType bubble_type) { 114 FirstRun::BubbleType bubble_type) {
113 if (!field_ || ![field_ window]) 115 if (!field_ || ![field_ window])
114 return; 116 return;
115 117
116 // The bubble needs to be just below the Omnibox and slightly to the right 118 // The bubble needs to be just below the Omnibox and slightly to the right
117 // of the left omnibox icon, so shift x and y co-ordinates. 119 // of the left omnibox icon, so shift x and y co-ordinates.
118 const NSPoint kOffset = NSMakePoint(1, 4); 120 const NSPoint kOffset = NSMakePoint(1, 4);
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 556
555 // These need to change anytime the layout changes. 557 // These need to change anytime the layout changes.
556 // TODO(shess): Anytime the field editor might have changed, the 558 // TODO(shess): Anytime the field editor might have changed, the
557 // cursor rects almost certainly should have changed. The tooltips 559 // cursor rects almost certainly should have changed. The tooltips
558 // might change even when the rects don't change. 560 // might change even when the rects don't change.
559 [field_ resetFieldEditorFrameIfNeeded]; 561 [field_ resetFieldEditorFrameIfNeeded];
560 [field_ updateCursorAndToolTipRects]; 562 [field_ updateCursorAndToolTipRects];
561 563
562 [field_ setNeedsDisplay:YES]; 564 [field_ setNeedsDisplay:YES];
563 } 565 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698