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

Side by Side Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 6881107: Rework the way Widget::Init works: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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/chromeos/input_method/candidate_window.h" 5 #include "chrome/browser/chromeos/input_method/candidate_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 &CandidateWindowController::Impl::OnConnectionChange); 1275 &CandidateWindowController::Impl::OnConnectionChange);
1276 1276
1277 // Create the candidate window view. 1277 // Create the candidate window view.
1278 CreateView(); 1278 CreateView();
1279 1279
1280 return true; 1280 return true;
1281 } 1281 }
1282 1282
1283 void CandidateWindowController::Impl::CreateView() { 1283 void CandidateWindowController::Impl::CreateView() {
1284 // Create a non-decorated frame. 1284 // Create a non-decorated frame.
1285 frame_.reset(views::Widget::CreateWidget( 1285 frame_.reset(views::Widget::CreateWidget());
1286 views::Widget::CreateParams(views::Widget::CreateParams::TYPE_POPUP)));
1287 // The size is initially zero. 1286 // The size is initially zero.
1288 frame_->Init(NULL, gfx::Rect(0, 0)); 1287 frame_->Init(
1288 views::Widget::CreateParams(views::Widget::CreateParams::TYPE_POPUP));
1289 1289
1290 // Create the candidate window. 1290 // Create the candidate window.
1291 candidate_window_ = new CandidateWindowView(frame_.get()); 1291 candidate_window_ = new CandidateWindowView(frame_.get());
1292 candidate_window_->Init(); 1292 candidate_window_->Init();
1293 candidate_window_->AddObserver(this); 1293 candidate_window_->AddObserver(this);
1294 1294
1295 // Put the candidate window view on the frame. The frame is resized 1295 // Put the candidate window view on the frame. The frame is resized
1296 // later when the candidate window is shown. 1296 // later when the candidate window is shown.
1297 views::RootView* root_view = frame_->GetRootView(); 1297 views::RootView* root_view = frame_->GetRootView();
1298 // |root_view| owns the |candidate_window_|, thus |frame_| effectively 1298 // |root_view| owns the |candidate_window_|, thus |frame_| effectively
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1409
1410 CandidateWindowController::~CandidateWindowController() { 1410 CandidateWindowController::~CandidateWindowController() {
1411 delete impl_; 1411 delete impl_;
1412 } 1412 }
1413 1413
1414 bool CandidateWindowController::Init() { 1414 bool CandidateWindowController::Init() {
1415 return impl_->Init(); 1415 return impl_->Init();
1416 } 1416 }
1417 1417
1418 } // namespace chromeos 1418 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/frame/panel_controller.cc ('k') | chrome/browser/chromeos/login/background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698