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

Side by Side Diff: chrome/browser/views/extensions/extension_installed_bubble.cc

Issue 1107007: Extension context menu refactor (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
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 #include "chrome/browser/views/extensions/extension_installed_bubble.h" 5 #include "chrome/browser/views/extensions/extension_installed_bubble.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 browser_view->GetToolbarView()->browser_actions(); 242 browser_view->GetToolbarView()->browser_actions();
243 if (container->animating() && 243 if (container->animating() &&
244 animation_wait_retries_++ < kAnimationWaitMaxRetry) { 244 animation_wait_retries_++ < kAnimationWaitMaxRetry) {
245 // We don't know where the view will be until the container has stopped 245 // We don't know where the view will be until the container has stopped
246 // animating, so check back in a little while. 246 // animating, so check back in a little while.
247 MessageLoopForUI::current()->PostDelayedTask( 247 MessageLoopForUI::current()->PostDelayedTask(
248 FROM_HERE, NewRunnableMethod(this, 248 FROM_HERE, NewRunnableMethod(this,
249 &ExtensionInstalledBubble::ShowInternal), kAnimationWaitTime); 249 &ExtensionInstalledBubble::ShowInternal), kAnimationWaitTime);
250 return; 250 return;
251 } 251 }
252 reference_view = container->GetBrowserActionView(extension_); 252 reference_view = container->GetBrowserActionView(
253 extension_->browser_action());
253 // If the view is not visible then it is in the chevron, so point the 254 // If the view is not visible then it is in the chevron, so point the
254 // install bubble to the chevron instead. If this is an incognito window, 255 // install bubble to the chevron instead. If this is an incognito window,
255 // both could be invisible. 256 // both could be invisible.
256 if (!reference_view || !reference_view->IsVisible()) { 257 if (!reference_view || !reference_view->IsVisible()) {
257 reference_view = container->chevron(); 258 reference_view = container->chevron();
258 if (!reference_view || !reference_view->IsVisible()) 259 if (!reference_view || !reference_view->IsVisible())
259 reference_view = NULL; // fall back to app menu below. 260 reference_view = NULL; // fall back to app menu below.
260 } 261 }
261 } else if (type_ == PAGE_ACTION) { 262 } else if (type_ == PAGE_ACTION) {
262 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); 263 LocationBarView* location_bar_view = browser_view->GetLocationBarView();
(...skipping 24 matching lines...) Expand all
287 bool closed_by_escape) { 288 bool closed_by_escape) {
288 if (extension_->page_action()) { 289 if (extension_->page_action()) {
289 BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow( 290 BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow(
290 browser_->window()->GetNativeHandle()); 291 browser_->window()->GetNativeHandle());
291 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( 292 browser_view->GetLocationBarView()->SetPreviewEnabledPageAction(
292 extension_->page_action(), 293 extension_->page_action(),
293 false); // preview_enabled 294 false); // preview_enabled
294 } 295 }
295 Release(); // Balanced in ctor. 296 Release(); // Balanced in ctor.
296 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698