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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10162017: Re-reland Propagate OnNativeWidgetMove to delegate/observers, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 8 years, 8 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 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
43 #include "chrome/browser/ui/tabs/tab_menu_model.h" 43 #include "chrome/browser/ui/tabs/tab_menu_model.h"
44 #include "chrome/browser/ui/view_ids.h" 44 #include "chrome/browser/ui/view_ids.h"
45 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h" 45 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
46 #include "chrome/browser/ui/views/avatar_menu_button.h" 46 #include "chrome/browser/ui/views/avatar_menu_button.h"
47 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 47 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
48 #include "chrome/browser/ui/views/browser_dialogs.h" 48 #include "chrome/browser/ui/views/browser_dialogs.h"
49 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h" 49 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
50 #include "chrome/browser/ui/views/download/download_shelf_view.h" 50 #include "chrome/browser/ui/views/download/download_shelf_view.h"
51 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 51 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
52 #include "chrome/browser/ui/views/frame/browser_window_move_observer.h"
53 #include "chrome/browser/ui/views/frame/contents_container.h" 52 #include "chrome/browser/ui/views/frame/contents_container.h"
54 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h" 53 #include "chrome/browser/ui/views/fullscreen_exit_bubble_views.h"
55 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" 54 #include "chrome/browser/ui/views/infobars/infobar_container_view.h"
56 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 55 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
57 #include "chrome/browser/ui/views/password_generation_bubble_view.h" 56 #include "chrome/browser/ui/views/password_generation_bubble_view.h"
58 #include "chrome/browser/ui/views/status_bubble_views.h" 57 #include "chrome/browser/ui/views/status_bubble_views.h"
59 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" 58 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
60 #include "chrome/browser/ui/views/tabs/tab_strip_factory.h" 59 #include "chrome/browser/ui/views/tabs/tab_strip_factory.h"
61 #include "chrome/browser/ui/views/toolbar_view.h" 60 #include "chrome/browser/ui/views/toolbar_view.h"
62 #include "chrome/browser/ui/views/update_recommended_message_box.h" 61 #include "chrome/browser/ui/views/update_recommended_message_box.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 contents_(NULL), 341 contents_(NULL),
343 contents_split_(NULL), 342 contents_split_(NULL),
344 devtools_dock_side_(DEVTOOLS_DOCK_SIDE_BOTTOM), 343 devtools_dock_side_(DEVTOOLS_DOCK_SIDE_BOTTOM),
345 initialized_(false), 344 initialized_(false),
346 ignore_layout_(true), 345 ignore_layout_(true),
347 #if defined(OS_WIN) && !defined(USE_AURA) 346 #if defined(OS_WIN) && !defined(USE_AURA)
348 hung_window_detector_(&hung_plugin_action_), 347 hung_window_detector_(&hung_plugin_action_),
349 ticker_(0), 348 ticker_(0),
350 #endif 349 #endif
351 force_location_bar_focus_(false), 350 force_location_bar_focus_(false),
352 move_observer_(NULL),
353 ALLOW_THIS_IN_INITIALIZER_LIST(color_change_listener_(this)) { 351 ALLOW_THIS_IN_INITIALIZER_LIST(color_change_listener_(this)) {
354 browser_->tabstrip_model()->AddObserver(this); 352 browser_->tabstrip_model()->AddObserver(this);
355 } 353 }
356 354
357 BrowserView::~BrowserView() { 355 BrowserView::~BrowserView() {
358 #if defined(USE_ASH) 356 #if defined(USE_ASH)
359 // Destroy LauncherUpdater early on as it listens to the TabstripModel, which 357 // Destroy LauncherUpdater early on as it listens to the TabstripModel, which
360 // is destroyed by the browser. 358 // is destroyed by the browser.
361 icon_updater_.reset(); 359 icon_updater_.reset();
362 #endif 360 #endif
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 web_contents->GetRenderViewHost()->NotifyMoveOrResizeStarted(); 1625 web_contents->GetRenderViewHost()->NotifyMoveOrResizeStarted();
1628 } 1626 }
1629 1627
1630 void BrowserView::OnWidgetMove() { 1628 void BrowserView::OnWidgetMove() {
1631 if (!initialized_) { 1629 if (!initialized_) {
1632 // Creating the widget can trigger a move. Ignore it until we've initialized 1630 // Creating the widget can trigger a move. Ignore it until we've initialized
1633 // things. 1631 // things.
1634 return; 1632 return;
1635 } 1633 }
1636 1634
1637 if (move_observer_)
1638 move_observer_->OnWidgetMoved();
1639
1640 // Cancel any tabstrip animations, some of them may be invalidated by the 1635 // Cancel any tabstrip animations, some of them may be invalidated by the
1641 // window being repositioned. 1636 // window being repositioned.
1642 // Comment out for one cycle to see if this fixes dist tests. 1637 // Comment out for one cycle to see if this fixes dist tests.
1643 // tabstrip_->DestroyDragController(); 1638 // tabstrip_->DestroyDragController();
1644 1639
1645 // status_bubble_ may be NULL if this is invoked during construction. 1640 // status_bubble_ may be NULL if this is invoked during construction.
1646 if (status_bubble_.get()) 1641 if (status_bubble_.get())
1647 status_bubble_->Reposition(); 1642 status_bubble_->Reposition();
1648 1643
1649 browser::HideBookmarkBubbleView(); 1644 browser::HideBookmarkBubbleView();
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 return; 2485 return;
2491 2486
2492 PasswordGenerationBubbleView* bubble = 2487 PasswordGenerationBubbleView* bubble =
2493 new PasswordGenerationBubbleView(bounds, 2488 new PasswordGenerationBubbleView(bounds,
2494 this, 2489 this,
2495 web_contents->GetRenderViewHost()); 2490 web_contents->GetRenderViewHost());
2496 views::BubbleDelegateView::CreateBubble(bubble); 2491 views::BubbleDelegateView::CreateBubble(bubble);
2497 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2492 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2498 bubble->Show(); 2493 bubble->Show();
2499 } 2494 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/browser_window_move_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698