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

Side by Side Diff: chrome/browser/ui/views/dropdown_bar_host.cc

Issue 6476031: Initialize DropdownBarHost member (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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
« 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/dropdown_bar_host.h" 5 #include "chrome/browser/ui/views/dropdown_bar_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/dropdown_bar_view.h" 10 #include "chrome/browser/ui/views/dropdown_bar_view.h"
(...skipping 25 matching lines...) Expand all
36 using gfx::Path; 36 using gfx::Path;
37 37
38 // static 38 // static
39 bool DropdownBarHost::disable_animations_during_testing_ = false; 39 bool DropdownBarHost::disable_animations_during_testing_ = false;
40 40
41 //////////////////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////////////////
42 // DropdownBarHost, public: 42 // DropdownBarHost, public:
43 43
44 DropdownBarHost::DropdownBarHost(BrowserView* browser_view) 44 DropdownBarHost::DropdownBarHost(BrowserView* browser_view)
45 : browser_view_(browser_view), 45 : browser_view_(browser_view),
46 view_(NULL),
46 animation_offset_(0), 47 animation_offset_(0),
48 focus_manager_(NULL),
47 esc_accel_target_registered_(false), 49 esc_accel_target_registered_(false),
48 is_visible_(false) { 50 is_visible_(false) {
49 } 51 }
50 52
51 void DropdownBarHost::Init(DropdownBarView* view) { 53 void DropdownBarHost::Init(DropdownBarView* view) {
52 view_ = view; 54 view_ = view;
53 55
54 // Initialize the host. 56 // Initialize the host.
55 host_.reset(CreateHost()); 57 host_.reset(CreateHost());
56 host_->InitWithWidget(browser_view_->GetWidget(), gfx::Rect()); 58 host_->InitWithWidget(browser_view_->GetWidget(), gfx::Rect());
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 focus_manager_->RegisterAccelerator(escape, this); 312 focus_manager_->RegisterAccelerator(escape, this);
311 esc_accel_target_registered_ = true; 313 esc_accel_target_registered_ = true;
312 } 314 }
313 315
314 void DropdownBarHost::UnregisterAccelerators() { 316 void DropdownBarHost::UnregisterAccelerators() {
315 DCHECK(esc_accel_target_registered_); 317 DCHECK(esc_accel_target_registered_);
316 views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false); 318 views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false);
317 focus_manager_->UnregisterAccelerator(escape, this); 319 focus_manager_->UnregisterAccelerator(escape, this);
318 esc_accel_target_registered_ = false; 320 esc_accel_target_registered_ = false;
319 } 321 }
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