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

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

Issue 7281029: Fixes DomView selection problems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty line Created 9 years, 5 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/dom_view.h" 5 #include "chrome/browser/ui/views/dom_view.h"
6 6
7 #include "chrome/browser/renderer_preferences_util.h"
7 #include "content/browser/tab_contents/tab_contents.h" 8 #include "content/browser/tab_contents/tab_contents.h"
8 #include "views/focus/focus_manager.h" 9 #include "views/focus/focus_manager.h"
9 10
10 #if defined(TOUCH_UI) 11 #if defined(TOUCH_UI)
11 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h" 12 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h"
12 #endif 13 #endif
13 14
14 // static 15 // static
15 const char DOMView::kViewClassName[] = 16 const char DOMView::kViewClassName[] =
16 "browser/ui/views/DOMView"; 17 "browser/ui/views/DOMView";
(...skipping 10 matching lines...) Expand all
27 std::string DOMView::GetClassName() const { 28 std::string DOMView::GetClassName() const {
28 return kViewClassName; 29 return kViewClassName;
29 } 30 }
30 31
31 bool DOMView::Init(Profile* profile, SiteInstance* instance) { 32 bool DOMView::Init(Profile* profile, SiteInstance* instance) {
32 if (initialized_) 33 if (initialized_)
33 return true; 34 return true;
34 35
35 initialized_ = true; 36 initialized_ = true;
36 tab_contents_.reset(CreateTabContents(profile, instance)); 37 tab_contents_.reset(CreateTabContents(profile, instance));
38
39 renderer_preferences_util::UpdateFromSystemSettings(
sky 2011/07/04 20:11:44 I'm not familiar with what renderer_preferences do
40 tab_contents_->GetMutableRendererPrefs(), profile);
41
37 // Attach the native_view now if the view is already added to Widget. 42 // Attach the native_view now if the view is already added to Widget.
38 if (GetWidget()) 43 if (GetWidget())
39 AttachTabContents(); 44 AttachTabContents();
40 45
41 return true; 46 return true;
42 } 47 }
43 48
44 TabContents* DOMView::CreateTabContents(Profile* profile, 49 TabContents* DOMView::CreateTabContents(Profile* profile,
45 SiteInstance* instance) { 50 SiteInstance* instance) {
46 return new TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL); 51 return new TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL);
(...skipping 26 matching lines...) Expand all
73 Detach(); 78 Detach();
74 } 79 }
75 80
76 void DOMView::AttachTabContents() { 81 void DOMView::AttachTabContents() {
77 #if defined(TOUCH_UI) 82 #if defined(TOUCH_UI)
78 AttachToView(static_cast<TabContentsViewTouch*>(tab_contents_->view())); 83 AttachToView(static_cast<TabContentsViewTouch*>(tab_contents_->view()));
79 #else 84 #else
80 Attach(tab_contents_->GetNativeView()); 85 Attach(tab_contents_->GetNativeView());
81 #endif 86 #endif
82 } 87 }
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