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

Side by Side Diff: ash/wm/maximize_bubble_controller.cc

Issue 10836182: Obfuscated Gaia ID fetcher (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase to master Created 8 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
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 "ash/wm/maximize_bubble_controller.h" 5 #include "ash/wm/maximize_bubble_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/window_animations.h" 9 #include "ash/wm/window_animations.h"
10 #include "ash/wm/workspace/frame_maximize_button.h" 10 #include "ash/wm/workspace/frame_maximize_button.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 public: 216 public:
217 explicit Bubble(MaximizeBubbleController* owner, int appearance_delay_ms_); 217 explicit Bubble(MaximizeBubbleController* owner, int appearance_delay_ms_);
218 virtual ~Bubble() {} 218 virtual ~Bubble() {}
219 219
220 // The window of the menu under which the SnapSizer will get created. 220 // The window of the menu under which the SnapSizer will get created.
221 aura::Window* GetBubbleWindow(); 221 aura::Window* GetBubbleWindow();
222 222
223 // Overridden from views::BubbleDelegateView. 223 // Overridden from views::BubbleDelegateView.
224 virtual gfx::Rect GetAnchorRect() OVERRIDE; 224 virtual gfx::Rect GetAnchorRect() OVERRIDE;
225 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 225 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
226 virtual bool CanActivate() const OVERRIDE { return false; }
226 227
227 // Overridden from views::WidgetDelegateView. 228 // Overridden from views::WidgetDelegateView.
228 virtual bool HasHitTestMask() const OVERRIDE; 229 virtual bool HasHitTestMask() const OVERRIDE;
229 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; 230 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
230 231
231 // Implementation of MouseWatcherListener. 232 // Implementation of MouseWatcherListener.
232 virtual void MouseMovedOutOfHost(); 233 virtual void MouseMovedOutOfHost();
233 234
234 // Implementation of MouseWatcherHost. 235 // Implementation of MouseWatcherHost.
235 virtual bool Contains(const gfx::Point& screen_point, 236 virtual bool Contains(const gfx::Point& screen_point,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 404
404 SetLayoutManager(new views::BoxLayout( 405 SetLayoutManager(new views::BoxLayout(
405 views::BoxLayout::kVertical, 0, 0, kLayoutSpacing)); 406 views::BoxLayout::kVertical, 0, 0, kLayoutSpacing));
406 407
407 contents_view_ = new BubbleContentsView(this); 408 contents_view_ = new BubbleContentsView(this);
408 AddChildView(contents_view_); 409 AddChildView(contents_view_);
409 410
410 // Note that the returned widget has an observer which points to our 411 // Note that the returned widget has an observer which points to our
411 // functions. 412 // functions.
412 bubble_widget_ = views::BubbleDelegateView::CreateBubble(this); 413 bubble_widget_ = views::BubbleDelegateView::CreateBubble(this);
414 bubble_widget_->set_focus_on_creation(false);
413 415
414 SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 416 SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
415 bubble_widget_->non_client_view()->frame_view()->set_background(NULL); 417 bubble_widget_->non_client_view()->frame_view()->set_background(NULL);
416 418
417 bubble_border_ = new MaximizeBubbleBorder(this, anchor_view()); 419 bubble_border_ = new MaximizeBubbleBorder(this, anchor_view());
418 GetBubbleFrameView()->SetBubbleBorder(bubble_border_); 420 GetBubbleFrameView()->SetBubbleBorder(bubble_border_);
419 GetBubbleFrameView()->set_background(NULL); 421 GetBubbleFrameView()->set_background(NULL);
420 422
421 // Recalculate size with new border. 423 // Recalculate size with new border.
422 SizeToContents(); 424 SizeToContents();
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 if (!GetBoundsInScreen().Contains(screen_location)) 808 if (!GetBoundsInScreen().Contains(screen_location))
807 button_row_->ButtonHovered(NULL); 809 button_row_->ButtonHovered(NULL);
808 else 810 else
809 button_row_->ButtonHovered(this); 811 button_row_->ButtonHovered(this);
810 812
811 // Pass the event on to the normal handler. 813 // Pass the event on to the normal handler.
812 return views::ImageButton::OnMouseDragged(event); 814 return views::ImageButton::OnMouseDragged(event);
813 } 815 }
814 816
815 } // namespace ash 817 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698