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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 297503003: Revert: [Refactor] Consolidate the logic for whether a widget can be activated. This is a first ste (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windowsx.h> 8 #include <windowsx.h>
9 #endif 9 #endif
10 10
(...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 point_down(point_down), 2341 point_down(point_down),
2342 file_supported(true) { 2342 file_supported(true) {
2343 arrow_view = new views::ImageView; 2343 arrow_view = new views::ImageView;
2344 arrow_view->SetImage(GetDropArrowImage(point_down)); 2344 arrow_view->SetImage(GetDropArrowImage(point_down));
2345 2345
2346 arrow_window = new views::Widget; 2346 arrow_window = new views::Widget;
2347 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 2347 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
2348 params.keep_on_top = true; 2348 params.keep_on_top = true;
2349 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 2349 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
2350 params.accept_events = false; 2350 params.accept_events = false;
2351 params.can_activate = false;
2351 params.bounds = gfx::Rect(drop_indicator_width, drop_indicator_height); 2352 params.bounds = gfx::Rect(drop_indicator_width, drop_indicator_height);
2352 params.context = context->GetNativeView(); 2353 params.context = context->GetNativeView();
2353 arrow_window->Init(params); 2354 arrow_window->Init(params);
2354 arrow_window->SetContentsView(arrow_view); 2355 arrow_window->SetContentsView(arrow_view);
2355 } 2356 }
2356 2357
2357 TabStrip::DropInfo::~DropInfo() { 2358 TabStrip::DropInfo::~DropInfo() {
2358 // Close eventually deletes the window, which deletes arrow_view too. 2359 // Close eventually deletes the window, which deletes arrow_view too.
2359 arrow_window->Close(); 2360 arrow_window->Close();
2360 } 2361 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 else 2643 else
2643 RemoveMessageLoopObserver(); 2644 RemoveMessageLoopObserver();
2644 } 2645 }
2645 2646
2646 bool TabStrip::GetAdjustLayout() const { 2647 bool TabStrip::GetAdjustLayout() const {
2647 if (!adjust_layout_) 2648 if (!adjust_layout_)
2648 return false; 2649 return false;
2649 return chrome::GetHostDesktopTypeForNativeView( 2650 return chrome::GetHostDesktopTypeForNativeView(
2650 GetWidget()->GetNativeView()) == chrome::HOST_DESKTOP_TYPE_ASH; 2651 GetWidget()->GetNativeView()) == chrome::HOST_DESKTOP_TYPE_ASH;
2651 } 2652 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/screen_capture_notification_ui_views.cc ('k') | mojo/examples/launcher/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698